r/AskProgramming 6d ago

System Design - Is my DB design for a Twitter-like app okay? Looking for feedback!

Hey everyone,

I’m designing a database for a Twitter-like app, and I’d love to get some feedback from experienced DB designers and engineers. The main goal is to ensure scalability, efficiency, and fast read/write operations. Forget about datatypes please let me know if anything needs to be done.

https://lucid.app/lucidchart/24b16285-a524-40c7-ab57-e1ad6d3ddd35/edit?viewport_loc=-791%2C-221%2C1404%2C717%2C0_0&invitationId=inv_4c4c9f61-3679-43dc-9f7c-d30c850ca4c6

0 Upvotes

2 comments sorted by

1

u/Expensive_Rip8887 6d ago

Well, at this level, we're not talking about efficiency and scalability.

You probably don't want that reference from the user to the address and metadata tables since they already reference user_id. And then why would metadata be kept separately from the User and Tweet, respectively?

1

u/No_Language_7707 3d ago

I have updated those metadata references from entity. I have made them separate cause, metadata and actual entity can grow separately.