How ssahibsingh/social-media-database-project works
This repository is a SQL design for a basic social-media database, not a running frontend or service. Its documented scope covers user accounts and social connections, image/video posts, and public interactions such as likes, comments, bookmarks, and hashtag follows. The tree also includes a schema, database definition, and sample queries. No SQL source excerpts were provided, so the graph reflects only the documented entities and their evident conceptual relationships; it does not assert specific foreign keys or execution flows.
Main entry points: users.sql Users · post.sql Posts · comments.sql Comments · post_tags.sql Post tags
Components 16
Database foundation
- Schema
schema.sql - Database definition
table_database.sql - Sample queries
queries.sql
Accounts and connections
Posts and media
Social activity
- Hashtags
Database/hashtags.sql - Hashtag follows
Database/hashtag_follow.sql - Post likes
Database/post_likes.sql - Comments
Database/comments.sql - Comment likes
Database/comment_likes.sql - Bookmarks
Database/bookmarks.sql
Connections 17
- Users → Login: authenticates
- Users → Follows: connects users
- Users → Posts: authors
- Posts → Photos: stores media
- Posts → Videos: stores media
- Posts → Post tags: tagged with
- Post tags → Hashtags: references
- Users → Hashtag follows: follows topics
- Hashtag follows → Hashtags: tracks follows
- Users → Post likes: likes posts
- Post likes → Posts: records likes
- Users → Comments: comments on posts
- Comments → Posts: belongs to
- Users → Comment likes: likes comments
- Comment likes → Comments: records likes
- Users → Bookmarks: saves posts
- Bookmarks → Posts: references