Published 2 years ago by Martha
what are the database engines I can use with laravel 5 and later? also what is the criteria I would use to choose the best engine for my project ?
It all depends on your application specification. Personally I recommend you to use PostgreSQL.
Here's a good podcast about it Full Stack Radio 40: Edd Mann - You Should Switch to Postgres
but is it the best for my project ?
As we said, it all depends on your application specifications.
Think that PostegreSQL can do what MongoDB and what MySQL do and a lot of more things.
according to what I read I think that MySQL or PostegreSQL is the best for me as , my application is more like e-learning website , so there is student , teachers , courses... etc , relations between them . if I want to use database producers instead writing "sql queries" in my laravel code , which is better ( MySQL or PostegreSQL) in that now ? Thanks a lot guys (Y)
Honestly, you will not see or feel the difference if you are asking this question. All of DBMS mentioned here offer the same basic features (queries, relationships, indexes, transactions, ect.). The differences only become visible once you start using advanced features or your project grows in scale - you probably should not worry about any of that right now.
Your best bet is to go with the "default" database MySQL/MariaDB (those two are very similar and interchangeable, without getting into too much detail). Since you seem to be just starting out, it will be easiest to get support when you encounter problems. Sqlite is also great, but it has some quirks and is fundamentally different from other solutions, as it is not a database management system (DBMS), but a library.
My advice is to use MySQL/MariaDB for the best introduction into SQL databases. After you become more familiar with SQL concepts, you will be able to make a better, more informed decision on your next project :). But really, you cannot go wrong with any of the alternatives too.
[Advance warning - contains biased views]
I've used both MySQL and PostgreSQL, they are similar in quite a few ways:
@Martha - either will work fine for your purpose. I have a slight preference for PostgreSQL these days since someone showed some of its strengths to me:
PostgreSQL has more consistent date/time implementation (this is a big point for my uses).
Here's a really big point for me. In 2010 Oracle bought Sun Microsystems who run the MySQL project. At that point the lead developer forked MySQL to make MariaDB and took senior developers with him. Some say Oracle has a history of buying products and then milking them for every penny in professional support fees - but that's just what I've heard. FYI: MariaDB promises 100% compatibility with MySQL. PostgreSQL however has no owner. It's a 100% Open Source project, with no multi-national super-company overseeing it. Some of the major companies that use PostgreSQL allow their developers to spend some/all of their time on PostgreSQL development - partly so they can add features they need. New features are not as frequent (although in the last year they seem to have upped the pace), but what you get with PostgreSQL is a DBMS that is rock-solid reliable and very battle-tested. Every decision on date/time types, function names etc looks like it has been agonised over in the same way that @TaylorOtwell agonises over Laravel's code. That swings it for me!
There's more info here. https://www.wikivs.com/wiki/MySQL_vs_PostgreSQL
On the flip side, some of the software for managing MySQL is a bit nicer, I will give them that. There are also more online resources if you're new to databases in general.