You can login if you already have an account or register by clicking the button below.
Registering is free and all you need is a username and password. We never ask you for your e-mail.
[–]Craftkorb0 points
2 points
2 points
(+2|-0)
ago
First, MySQL (Or MariaDB) is also ACID compliant. If it does it well is a question I can't answer, as I barely ever used it.
I want to however point out why I think PostgreSQL is a overall 'better' solution. Disclaimer: I haven't used MySQL in a long time myself, things may have changed!
Foreign Data Wrappers: If needed, you can access all kinds of other databases through PostgreSQL. This may be another SQL DB, MongoDB, or something else. This feature is comparable to UNIXs mount functionality. You may end up never using these though.
The #postgresql IRC channel over at Freenode is quite active and helpful.
Also, their documentation is great.
Many features are added every release. Can't wait for the built in UPSERT coming in version 9.5 (UPSERT = INSERT or UPDATE if it exists)
It supports JSON directly. You can work with stored JSON documents much like with any other data type. You can SELECT them, you can even add indexes. This is a huge plus in my book.
If you fear it's hard to set up yourself, don't: It worked for me out of the box, no configuration changes needed.
PostgreSQL is more happy with throwing errors. So, if you have a VARCHAR(30) column and you want to put something in there longer than 30 characters, MySQL (by default at least) will just chop off everything coming after the 30th character and carry on. PostgreSQL will raise an error, telling you that it's too long. This is a really important thing to have, as MySQLs behaviour may just break things unexpected.
MySQL has a good number of creature-comfor featurse. For example, the "UPSERT" command has been with MySQL for a decade. MySQL also has had the "REPLACE" command which will either add a new row, or replace one if the values you're passing match an existing row's primary key.
MariaDB has support for working with JSON directly, though I don't know why you'd do this at the database level unless you absolutely had to. Probably makes more sense at the app level.
MySQL can operate in a strict mode where it will complain about truncated values or bad dates more vocally. (By default, it generates warnings, in strict mode, it will error.)
One of the things that really took me by surprise with Postgres is how rigid it is. For example, there is no good way to join tables from two different databases, even if they are on the same server. Actually, I think you can do it with federated databases now, but it's still a bunch of hoops to jump through. With MySQL the syntax is straightforward, the only drawback is that the user doing the query must have the right permissions for both.
There's lots of little differences like this (and big ones, too). At this point, I don't even know if it makes sense to try to compare them. For your purposes, either is most likely going to do the job and then some.
view the rest of the comments →
[–] Craftkorb 0 points 2 points 2 points (+2|-0) ago
First, MySQL (Or MariaDB) is also ACID compliant. If it does it well is a question I can't answer, as I barely ever used it.
I want to however point out why I think PostgreSQL is a overall 'better' solution. Disclaimer: I haven't used MySQL in a long time myself, things may have changed!
mountfunctionality. You may end up never using these though.UPSERTcoming in version 9.5 (UPSERT = INSERT or UPDATE if it exists)VARCHAR(30)column and you want to put something in there longer than 30 characters, MySQL (by default at least) will just chop off everything coming after the 30th character and carry on. PostgreSQL will raise an error, telling you that it's too long. This is a really important thing to have, as MySQLs behaviour may just break things unexpected.If I can, I'll stick to PostgreSQL.
[–] Drenki 0 points 1 point 1 point (+1|-0) ago (edited ago)
Pretty much all of this goes for either MySQL or MariaDB.
One of the things that really took me by surprise with Postgres is how rigid it is. For example, there is no good way to join tables from two different databases, even if they are on the same server. Actually, I think you can do it with federated databases now, but it's still a bunch of hoops to jump through. With MySQL the syntax is straightforward, the only drawback is that the user doing the query must have the right permissions for both.
There's lots of little differences like this (and big ones, too). At this point, I don't even know if it makes sense to try to compare them. For your purposes, either is most likely going to do the job and then some.