Needs advice
on
MongoDBMongoDBMySQLMySQL
and
PostgreSQLPostgreSQL

Hello,

I am trying to design an online ordering app similar to Doordash or Uber Eats. I'm having a hard time trying to finalise on what database (or mixture of databases) to use. I'm leaning towards using a relational database like MySQL or PostgreSQL. But, when the application grows, I don't want to join on 20 tables to get a data. Any help would be greatly appreciated. Thank you for your time.

READ LESS
7 upvotes·858.8K views
Replies (2)
Cofounder at Wanderloop·

I would recommend a mixture of MySQL and MongoDB. Using MongoDB for the Content Distribution Network (CDN) will make it easy to store high volume incoming data. MySQL is recommended to be used for business logic. PostgreSQL is not recommended since you will be faced with inefficient database replication features and constant migration from one PostgreSQL version to another.

READ MORE
1 upvote·2 comments·758K views
aleyrizvi
aleyrizvi
·
May 26th 2020 at 4:07PM

How about mysql 8 with xdev protocol? Basically it offers a document store right out of the box.

·
Reply
Rafey Iqbal Rahman
Rafey Iqbal Rahman
·
May 27th 2020 at 7:12AM

The X Protocol is good.

·
Reply
CTO at Voila Cab's·
Recommends
on
MySQL

Hello Suhas , We build our product www.voilacabs.com which is in the same lines as yours but we have used a combination of Mysql and MongoDB. When using MySQL, i would recommend doing the following: 1. Use Mysql only for storage only and for realtime updates we recommend MongoDB. 2. Don't try to Join more than 3 tables. ( the moment you reach 3 join stop there and try to un-normalized database. 3. Never or very rarely use Auto-increments. ( we recommend using UUIDS ) . Use UUIDS always for Auto increments for MYSQL. If you using Postgre SQL then i would suggest you to please check this https://instagram-engineering.com/sharding-ids-at-instagram-1cf5a71e5a5c There is a stored procedure that generated unique keys instead of auto-increment keys and that will help you sharding or clustering database without sync errors. 4. Also For MongoDB if you can put a layer of REDIS Cache then that will boost your api performance under large loads. 5. Use Node.js programing language as that function asynchronously .

Let me know if you still need any suggestion's . Thanks & Regards Rupen Makhecha CTO @ Voila Cab's www.voilacabs.com

READ MORE
4 upvotes·3 comments·757.6K views
Raunaq Gupta
Raunaq Gupta
·
June 5th 2020 at 7:34AM

If you use MySQL and want a better sharding solution on top of it, then I suggest looking into @Vitess. You can also explore https://planetscale.com as a dbaas alternative to managing those services yourself.

·
Reply
Rupen Makhecha
Rupen Makhecha
·
June 5th 2020 at 8:05AM

Great, i think Vitess sounds promising. Thank you for this nice recommendation

·
Reply
Raunaq Gupta
Raunaq Gupta
·
June 5th 2020 at 8:37AM

Disclaimer: I work for PlanetScale where we maintain Vitess as well. We also have a beta feature currently in the works where someone can try out Vitess on top of their existing MySQL infra without making any changes. Please feel free to contact me if you'd be interested to test it out.

·
Reply
Avatar of Rafey Iqbal Rahman

Rafey Iqbal Rahman

Cofounder at Wanderloop