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...
发布评论
评论(4)
总的来说,我认为 PostgreSQL 在 web2py 社区中更受欢迎,书中甚至有一节讨论它的 web2py 的安装和使用。因此,如果您需要帮助,获得 Postgres 的帮助可能会更容易一些。另一方面,如果您已经熟悉 MySQL,那么您最好坚持使用您所知道的内容 - 它也应该可以很好地与 web2py 配合使用。另外,假设您将使用 web2py DAL,您可以轻松地从一个 RDBMS 切换到另一个 RDBMS,而无需更改任何 web2py 代码。
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.
我在春天从 PHP/MySQL(主要是 CakePHP)切换到了 web2py/PostgreSQL。我可以确认 web2py 社区更面向 Postgres,如果您使用 Postgres,您更有可能找到与 DAL 相关的特定问题的答案。您应该检查两个系统的许可要求,以确保两者都符合您的业务需求——MySQL 的许可最近随着所有权的变化而发生了一些变化。
需要考虑的一件事是,如果您是 web2py 的新手,您将同时学习两种新技术,并且这两种技术都是您项目的基础。我从对 MySQL 非常满意变成了对 PostgreSQL 非常尴尬。我认为——结果是错误的——SQL 就是 SQL。好吧,Postgres 中几乎每个常见命令都完全不同。查询本身很相似,但如果您使用 web2py,您可能不会编写任何手动查询;您将使用 DAL 语法来查询数据库。至少,仔细看看一些比较 两个系统的命令之间。有一个世界的不同。 Postgres 命令要短得多(“dt”而不是“show table”),但直观性要差得多。
简而言之,PostgreSQL 是一个很棒的 RDBMS,但您可能需要等到熟悉 web2py 后再进行切换。 web2py 和 DAL 的伟大之处在于您可以切换数据库系统,即使在创建应用程序之后也是如此。如果/当您切换数据库时,您可能会遇到一些障碍,但您可以在此处或 web2py 用户电子邮件列表(在 groups.google.com 上)上解决这些问题。
PS——无论您选择哪个数据库,除非您的数据库模式是一成不变的,否则请务必花时间完全理解 web2py DAL,特别是“migrate”和“fake_migrate”参数的用法和区别。您将熟悉web2py 书的第 6 章。
好消息是 web2py 的其余部分是轻而易举的。
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.
我说。无论您可以从控制台使用什么。有些事件可能需要从指尖修复数据库,您可能还希望在数据库中进行一些其他正在进行的操作,并且可能需要在 web2py 之外完成。
PosgreSQL 是我的选择,因为不规则行为少得多,因此更容易掌握......
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...
你应该尝试使用像 mongoDB 这样的 noSQL 数据库。如果你想付费 Informix 是一个不错的选择,但是 web2py 支持的最好的 DB 是 postgres
1.postgres
2.mongoDB
3.Informix
http://pypi.python.org/pypi/pymongo/
以下列表有web2py 支持的所有数据库:
SQLite
PostgreSQL
MySQL
甲骨文
MSSQL
火鸟
数据库2
信息系统
安格尔
库布里德
赛贝斯
泰拉数据
SAP数据库
MongoDB
IMAP
you should try to use a DB noSQL like mongoDB. If you want to pay Informix is a good choise, however the best DB supported by web2py is postgres
1.postgres
2.mongoDB
3.Informix
http://pypi.python.org/pypi/pymongo/
following list have all databases supported by web2py:
SQLite
PostgreSQL
MySQL
Oracle
MSSQL
FireBird
DB2
Informix
Ingres
Cubrid
Sybase
Teradata
SAPDB
MongoDB
IMAP