We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

What database do you recommend?

I want to make a personal project of an application. Which base would they use, Mysql everyone uses it, but what about PostgresSQl or a Nosql like Casandra or MongoDB, who would recommend me? I am willing to learn the engine if necessary.



4.5k

In debian 9, MondoDB has replaced mysql as default database engine. Work the same, yet you can easely set-up clustering.

if you want a database engine that is stricker by default I would go for postgresql.

Here is a nice video that compares mysql with postgresql https://www.youtube.com/watch?v=emgJtr9tIME

edited May '18

PostgreSQL has better planner than MySQL, and a lot of features you could consider enterprise, and it's as fast as MySQL for simple database structure. When you have complicated DB structure with a lot of foreign keys, JOINS etc, PostgreSQL is even better. MySQL has been made for simple things.



79.0k
Accepted
answer
edited May '18

In debian 9, MondoDB has replaced mysql as default database engine. Work the same, yet you can easely set-up clustering.

That's like comparing apples to oranges. How in the world MongoDB (which I have used since 2012) can "work the same" as MySQL/MariaDB, where latter is strict SQL DB engine? Have you tried to port app written with SQL in mind to MongoDB schema-less documents and did it worked out of the box? No?

IMHO this is ages old question. IF your data are strongly relational - go with latest MariaDB which is by magnitude better than plain MySQL. Of course PostgreSQL is a great DB engine too, it's just that MariaDB for most cases are easier to run/maintain etc.

If you organize your data in another way - and can make advantage of document based DB (or similar) - then go with NoSQL - MongoDB etc.

Also hybrid solution is a good choice - so parts of app will use SQL and other parts will use NoSQL depending on the context.

Im using MariaDB and it's pretty fine.