Represents each person who joins Facebook. Each user would obviously have many more fields than listed here (DOB, gender, etc.) but we're keeping it basic for illustration purposes.
Links the user to the university and ensures that you can easily get to the list of users at a particular university. For example, if you want to show a user a list of everyone at their school, you would just "Do a search for Users where University = Current User's University"
Lists the users that this user is friends with. Note that this is somewhat redundant with the friendship object below but this field is useful a) to make it quicker to retrieve someone's list of friends b) to set up proper privacy rules
The groups that the user belongs to
Controls whether the user has master access to data on the platform
Date email verified
When the email address of the user was verified (necessary to ensure only users from certain universities can join)
The universities that have been added to the system. When a student attempt to register, we will make sure that their email address domain matches a university that has been added.
The field that we will use to match students' domains to the universities that have been added to the system.
Posts created on someone's wall (own or someone else's)
|Post||Text||text||Text of the post|
Image attached to the post (if included)
The user whose wall the post is created on. This could be the same user as the Creator of the post (if posting on their own wall) or a different user. Can also be blank if a group post.
The group in which the post is created. Will be blank if the post is created on a user's wall.
Friend requests sent
The user who sends the request
The user who receives the request
Would start at "Pending" and then move to "Declined" or "Accepted"
A list that contains all of the Users who are part of the conversation. When messaging happens from a user to another user, this list would only have 2 users in it. Later on, when group messaging is introduced, this list would have more people in it.
The Messages that are part of the conversation
The User who created the message. Note that we created a different field for this than the standard built-in "Creator" field, so that we have more flexibility (like for creating messages through the API)
The actual text of the message
Image attached to the message
|Message||Message Thread||Message Thread|
Links the message to the thread that it's part of. Note the two-way linkage, which is redundant but also ensure flexibility
A group that has been created. Note that this assumes that there is no sort of an approval process that happens when joining a group. If there was an approval process, then additional objects/fields would be needed
Name of the group
List of group's members. Note the redundancy with the field on the user.
Represents someone clicking the "like" button. In this version only posts can be liked but a separate object is needed to ensure that in the future we can easily add other types of things that can be liked.
|Like||Post||Post||The liked post|
Records someone "poking" someone else
The user who initiates the poke
The user who receives the poke
Records a notification that occurs whenever there is something relevant to a user on the platform
The recepient of the notification
"Poke", "Like", "Post", or "Friend Request"
Connects the notification to one of the objects to which the notification pertains. Note that only one of these fields would be filled out at a time.
|Notification||Friend Request||Friend Request|
When the receiver viewed the notification. Note that we opted for a date field instead of yes/no, so that we have richer information (not just whether the notification was viewed but when it was viewed)