which is better for production with web2py?

which is better for production with web2py? please more insights. I'm very new 2 web2py and i am working on a small pharmacy mgt system. pls which is better for production postgres or mysql? if postgres, step by step installation guide pls so to smoothly work with web2py. thanks


In general, I think PostgreSQL is more popular among the web2py community, and there is even a section of the book discussing its installation and usage with web2py. So, if you need assistance, it might be a little easier to get help with Postgres. On the other hand, if you're already familiar with MySQL, you might be better off sticking with what you know -- it should work just fine with web2py as well. Also, assuming you'll be using the web2py DAL, you can easily switch from one RDBMS to another without having to change any of your web2py code.


I switched from PHP/MySQL (CakePHP, mostly) to web2py/PostgreSQL in the spring. I can confirm that the web2py community is more oriented toward Postgres and you are more likely to find an answer to specific questions relating to the DAL if you use Postgres. And you should check the licensing requirements of both systems to be sure that both match your business needs -- MySQL's licenses have undergone some changes recently with the change in ownership.

One thing to think about is that if you are new to web2py, you will be learning two new technologies at the same time, and both fundamental to your project. I switched from being very comfortable on MySQL to very awkward on PostgreSQL. I assumed -- wrongly, it turned out -- that SQL is SQL. Well, just about every common command is totally different in Postgres. The queries themselves are similar, but you likely won't be composing any manual queries anyway if you're using web2py; you'll be using the DAL syntax to query to DB. At the least, take a good look at some comparisons between the commands of the two systems. There's a world of difference. Postgres commands are much shorter ("dt" instead of "show tables") but much less intuitive.

In short, PostgreSQL is a great RDBMS, but you may want to wait until you're comfortable with web2py before you switch. The great thing about web2py and the DAL is that you can switch database systems, even after you've created your app. You may face some hurdles if/when you switch databases, but you can get those straightened out here or on the web2py users e-mail list (on groups.google.com).

PS -- Regardless of which database you choose, unless your database schema is set in stone, be sure to take the time to fully understand the web2py DAL, particularly the uses of and differences between the "migrate" and "fake_migrate" arguments. You will become well acquainted with chapter 6 of the web2py book.

The good news is that the rest of web2py is a breeze.


I say. Whatever you can work with from console. Some events may require fixing db from fingertip, you may also want to have some other ongoing actions in db and it might need to be done outside web2py.

PosgreSQL is my choice as there are much less irregular behaviours thus its easier to grasp...

链接地址: http://www.djcxy.com/p/22748.html

上一篇: 典型的AngularJS工作流程和项目结构(使用Python Flask)

下一篇: 用web2py生产哪个更好?