A walkthrough of a simplified Twitter/X database schema covering core entities: users, tweets, likes, replies, retweets, followers, and media attachments. Explains the ERD step by step, highlighting many-to-many relationships (followers, likes), self-referential tweet replies, and trade-offs like storing retweets in a separate table vs. a column. Also touches on performance considerations such as counting likes at scale and the option to cache approximate counts in the tweet table.

5m watch time
1 Impression