Skip to content

JWu-Git/Instagram-Clone-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Instagram Database Clone

This is a MySQL database clone for Instagram that contains tables for users, photos, comments, likes, follows, tags, and photo_tags. It also includes some example SQL queries that can be used to extract information from the database.

How to Use

To use this database clone, simply copy and paste the code into a MySQL server and run the queries as needed. Make sure to update the database name in the code if necessary.

Tables

  • users: stores information about Instagram users
  • photos: stores information about photos uploaded by users
  • comments: stores information about comments made on photos
  • likes: stores information about likes made on photos
  • follows: stores information about followers and followees
  • tags: stores information about hashtags used on photos
  • photo_tags: stores information about the association between photos and hashtags

Example Queries

The following are some example SQL queries that can be used to extract information from the Instagram database:

  • Select all users
  • Select top 5 oldest users
  • Day of week most users registered on
  • Users who never posted a photo
  • Photo with most likes and user who created it
  • Average comments per user
  • Average photos per user
  • Top 5 most popular hashtags
  • Users who like every photo on site (possible bots)

EER diagram

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published