Question: Consider a photo-sharing Website, where users can post pictures, as well as comment and rate other users pictures. The schema is: Users(use rid, name) Comment(use

Consider a photo-sharing Website, where users can post pictures, as well as comment and rate other user’s pictures. The schema is:

Users(use rid, name)

Comment(use rid, pictured, score, text)

Picture(pictured, author, img)

The underlined attribute(s) represent the primary key for each relation

The database has the following constraints:

• Comment. use rid is a foreign key to Users. use rid

• Comment. pictured is a foreign key to the Picture. pictured

• Picture. the author is a foreign key to Users. use rid

• Comment. a score is an integer number between 1 and 10

• All attributes are NOT NULL

Write a SQL query that returns all users who have given a score of 8 or higher to 50 pictures or more. For each user, your query should return the user ID and the name

Step by Step Solution

3.48 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

ANSWER GIVEN THAT The SQL query below SELECT Usersuse... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!