by yummyfajitas · 13y ago · 0 comments
1) Your legacy shared hosting site might provide MySQL and not Postgres.
There are also 9 reasons to choose one of {Postgres, MySQL} over {Oracle, SQL Server}.
Here is 1 reason to use Postgres: data integrity.
"00/00/0000 00:00:00.0000" is not a real date, but MySQL will helpfully insert it into your table if you try to insert NULL into a non-null datetime field. (One example among many.)
SET sql_mode = 'STRICT_ALL_TABLES';
http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html#...Yes, it's not default. Yes, it can be overridden. Yes, that bothers a lot of people.
With good reason. This is your database we're talking about. If it's going to be sloppy with your data by default, it's the wrong tool.
"it's the wrong tool" is an opinion and it is unsupported by history. It many cases, it's exactly the right tool and users are given the power to control the level of strictness they they require. Want to allow GROUP BYs that don't include all non-aggregate columns? Sure, you can do that. Or not. Want MySQL to accept what you give it and throw warnings instead of errors? Yep, you can do that, too. Or not.
The defaults are bad. No one will defend that. They are also easy to change. A privilege level allowing/denying the ability to change the sql_mode would be a welcome addition, also. Yet, MySQL is a capable tool that does some things really well, something things not so well, and some things terribly. Just like every other product out there. It is a tool. It works well for many, but not all cases. Apparently, you find it inadequate for your particular needs. I get that. You shouldn't use it.
3) Decent monitoring.
4) Commercial support.
And your argument about data integrity is valid but in the real world moot. Most developers are using an ORM these days which abstract problems like these away.
EnterpriseDB, Command Prompt, 2nd Quadrant, and all the others listed under http://www.postgresql.org/support/professional_support/
Many of those companies have people on staff who are members of the PostgreSQL core committee, or at least have commit bits. Can MySQL say the same?
If your response is going to be "But that's not commercial support from 'PostgreSQL' itself", that's the nature of the community. It was a deliberate choice by the community to structure itself that way: PostgreSQL — the community, the brand, or whatever you want to call it — can't be sold. This is a good thing, and I don't think I need to waste much time explaining why...
The only reason to go with mysql is when one uses a CMS that is tied to mysql ( wordpress for instance or several ecommerce scripts).
Otherwise there is no need to stick to MYSQL.