0

I have developed a reduced version Facebook posting database schema. I'm just wonder whether I am doing it correct or not. Could some help me take a look and give me some comments?

Condition:

      1. Email address can be used for one registration.

      2. Posting is composed of a text and images up to maximum 5.

      3. User can reply to a comment or reply.

      4. Comment can be liked but not be commented further.

      5. A user can only like a comment once.

      6. Post_id is unique. 

Registered User (User id, User_name, User_email_address, password)

User Profile (User id, Picture id)

User’s friend (User id, User id)

Posting (Post id, Post_text_message, User_id, Post_date_time)

Image in post (Post Id, Image id, User_id)

Image (Image id, Image _link)

Comment (Comment id, Post id, User_id, Comment_date_time, Comment_text_message)

Reply to comment (Reply comment id, Comment id, Post id, User_id, Reply_comment_date_time, Reply_comment_text_message)

Reply to reply (Reply_id, Reply_comment_id, User_id, Reply_to_reply_date_time, Reply_to_reply_text_message)

Like a posting (Posting id, Like user id)

Like a comment (Posting id, Like user id)

Like a reply (Reply comment id, Like user id)

Kishore Sahasranaman
  • 4,013
  • 3
  • 24
  • 50

1 Answers1

0

Are you are expecting a review. I would like to start with some of my suggestions.

  • The actions you are listed out here completely depends upon what is your purpose and scope of the application.
  • For a simplified fb version , my opinion is completely in favour for you.

I would also like to share with you some of the links i came across.

Facebook database design?

https://www.quora.com/What-is-Facebooks-database-schema

https://www.percona.com/live/mysql-conference-2014/sites/default/files/slides/Percona%20Live%202014.pdf

https://dba.stackexchange.com/questions/10199/how-should-i-design-a-relationship-table-for-friendship

Community
  • 1
  • 1
Kishore Sahasranaman
  • 4,013
  • 3
  • 24
  • 50
  • yeah, may you do a review on my work? It is merely my individual work. I concern on the posting function on in this simplified Facebook. – Law Hong Ting Oct 24 '15 at 05:56