Skip to content

singshubham/ChatX

Repository files navigation

Social-Network-Database-Assignment

I have created a sql database, which is a MySQL Database, you can go to Localhost/PhpMyadmin, and import database, to start working on queries. Some of the queries are really tricky and will test your aptitude, and analytical skills, try hard before looking up to the solutions.

Part-1 : Databse Creation & Normalization

Create a database of Social Network

Requirements

  • Users can add their details – (First Name, Last Name, Gender, Date of Birth, Email Id, Password, Interests).
  • View others’ details.
  • Post something on their timeline.
  • View others’ posts.
  • Comment on posts.
  • ‘Like’ others’ comments or posts.
  • Create group.
  • View group details.
  • View group admin.
  • View group posts.
  • Send friend requests.
  • View friends
  • View online friends

Points to keep in mind while creating database

  • User can have multiple posts
  • Each post can have more than one comments
  • User can comment on a post more than once
  • User can either like or dislike a comment or post i.e., like only once on a post/comment
  • A group can have only one group admin
  • A user can be a member of more than one groups

Part-2 : Writing Up Queries

  1. View users’ all posts and display the number of likes and number of comments to that post.
  2. Display the comments posted by the user.
  3. Display the online friends of a particular user.
  4. Display the Group name, number of members of that Group and admin of that Group.
  5. Display the Members of the particular Group.
  6. Display post which don’t have any like.
  7. Display post which don’t have any comment.
  8. Display post which are liked by user's friend.
  9. Display Comments of a particular user which are liked by user’s friends.
  10. Display Posts of a particular user which are liked by user’s friends.
  11. Display Posts to particular group and also display the user’s name who posted it.
  12. Display posts of a group that is not liked by anyone.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published