NeoSQL
menu
Guide
Blog
Gallery
NEW
Pricing

Instagram (Study Case)

instagram
socialnetwork
messagingsystem
hashtag
directmessage
+2 LEO 5/7/2026 11
Auto-converts to your project's DB
Embed in blog or Notion

About this schema

This ERD represents a simplified Instagram-style social media platform database structure. The schema supports core social networking features including user accounts, posts, comments, likes, hashtags, stories, saved posts, and direct messaging. The `users` table stores account information, profile data, privacy settings, and authentication-related fields. User relationships are managed through the `follows` table, which enables follower and following connections between users. User-generated content is stored in the `posts` table. Each post can contain multiple images through the `post_images` table. Posts also support tagged locations and text captions. The interaction system includes comments and likes. The `comments` table supports nested replies using a self-referencing parent comment structure. Post and comment reactions are handled through the `post_likes` and `comment_likes` tables. Hashtag functionality is implemented using a many-to-many relationship between `posts` and `hashtags` through the `post_hashtags` mapping table. The schema also includes Instagram-style stories using the `stories` and `story_views` tables. Stories contain temporary content with expiration timestamps and user view tracking. For private communication, the ERD includes a direct messaging system composed of `direct_message_rooms`, `direct_message_room_members`, and `direct_messages`. This structure supports multi-user chat rooms and message history management. This ERD is intended for database modeling examples, ERD visualization, social media clone projects, and relational database design practice.

Schema details

15
Tables
65
Columns
22
Relationships
Database
MySQL
Author
LEO
Published
5/7/2026
Views
11