Question: Consider a database schema for a social media platform with three tables: users posts likes The users table has the following columns: integer column user
Consider a database schema for a social media platform with three tables:
users
posts
likes
The users table has the following columns:
integer column userid primary key
text column username
The posts table has the following columns:
integer column postid primary key
integer column userid references the userid column of the users table foreign key
text column postcontent
The likes table has the following columns:
integer column likeid primary key
integer column userid references the userid column of the users table foreign key
integer column postid references the postid column of the likes table foreign key
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
