Social Network Schema (ER)
Users, posts, follows, and likes.
Rendering…
Make it your own.
erDiagram
USER ||--o{ POST : writes
USER ||--o{ FOLLOW : follower
USER ||--o{ FOLLOW : following
USER ||--o{ LIKE : gives
POST ||--o{ LIKE : receives
USER {
uuid id PK
string handle
string name
}
POST {
uuid id PK
uuid user_id FK
string body
datetime created_at
}
FOLLOW {
uuid follower_id FK
uuid following_id FK
}
LIKE {
uuid user_id FK
uuid post_id FK
}