Databases
Post #7324 · source on Telegram
System Design Interview: Relational Database for a Dating App Pun
Description
A tweet from Ahad (@a_hahahahad, verified) showing a classic setup-punchline meme. The text reads '*in a system design interview* > what type of database would you use while designing a dating app (don't say it) (don't say it) (don't say it) . me: Relational Database'. Below is a two-panel image of Jim Halpert from The Office, first looking down trying to contain himself, then looking up with a knowing smirk. The joke is the double meaning of 'relational' -- technically a relational database (SQL) and 'relational' as in human relationships for a dating app
Use J and K for navigation
Comments
25Comment deleted
The real senior move is recommending a graph database -- because relationships are complicated, many-to-many, and eventually everyone ends up connected to everyone else through at most six degrees of swiping
Any senior dev knows the right answer is a graph database to model complex user connections, but also knows the 'relational database' pun will get a bigger laugh from the hiring committee
Nothing like a 100-table JOIN to prove you really believe in long-term relationships
The real question is whether you'd use optimistic or pessimistic locking for those relationship status updates
When the interviewer asks about databases for a dating app and you know they want to hear 'graph database' or 'distributed NoSQL,' but your 20 years of experience screams that a properly indexed PostgreSQL instance would handle millions of swipes before you'd even need to think about sharding
Go ahead, say relational - nothing says love at scale like an N-to-N join and a global write hotspot on likes. In prod you still bolt on a graph and a cache
They crave Neo4j for relationship graphs, but relational nails it: foreign keys enforce commitments better than NoSQL flings
Sakura of course Comment deleted
I mean, is there something wrong with using relational DB for dating apps ? Comment deleted
The only database I trust is base 8 Comment deleted
Nothing, the only problem is access lists. Comment deleted
What this about ? Comment deleted
Storing and checking for relations (same pun) between users for showing/hiding parts of the profile is PITA in RDBMS. Comment deleted
well, it kinda useless, because main thing is matching people, so you need vector database for it. of course you can use relational db and build custom vector index on top, but why ? Comment deleted
It's all fun and giggles until the curse of dimensionality kicks in. Comment deleted
Still better than scan full table and find matching keywords, lol Comment deleted
Indices are forbidden? Comment deleted
Just google google history and why they moved from matching keywords approach. Comment deleted
just google google dating app Comment deleted
I agree with you on that. But for managing user - post, user-chats, user-comments, other stuff non-related to the user-to-user connections with strong consistency guarantees, the relational DB is a go-to choice obviously. Could easily be combined with vector DB, though. Comment deleted
Exactly. IIRC Badoo used 5 different DBMSs with relational one as the root source for others. Comment deleted
☃️☃️☃️ Comment deleted
It is technically correct. The best way to be correct Comment deleted
Out of my mind lmao Comment deleted
https://youtu.be/daZCDGYKi74 Comment deleted