Question: ion #2: 125points! Consider the followin User uid, name) Picture (pid, owner, si .User.uid, Picture.pid, Comment.cid are the prim Ouest ing FACEBOOK database schema

 \ ion #2: 125points! Consider the followin User uid, name) Picture

\ ion #2: 125points! Consider the followin User uid, name) Picture (pid, owner, si .User.uid, Picture.pid, Comment.cid are the prim Ouest ing FACEBOOK database schema Picture (pid, owner, size) Comment (cid, uno, pic, text) Where and Comment.uno are foreign keys to Users Comment,pic is a foreign key to Picture, A) Write SQL query that counts, for every user, the number of other users who have commented on their pictures. ANdl Pictwa.Pi owp Du user. Nome B) Write SOL query that finds the users (uid and nane) who comments on all Facebook pictures. Select? User, uid uner. Naine + whar C) Two users are friends if they comment on each other's pictures: that is, r and y are friends if r made a comment on some picture of y, and y made a comment on some picture of x. Write SQL query that computes, for each user, the number of his/her inends Selset urek. Name Coutc Commant1.pic ANol uper 2Cot2.un ANd Comen t 2.pic-Pichua-Prd And piduve 2.ownw: Group

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!