Question 14 Consider the following schema and answer the following questions: Users(userld: integer, userName: varchar, userCity: varchar) Comment(userld: integer, pictureld:; integer, score: integer,...


Question 14<br>Consider the following schema and answer the following questions:<br>Users(userld: integer, userName: varchar, userCity: varchar)<br>Comment(userld: integer, pictureld:; integer, score: integer, commentText: varchar)<br>Picture(pictureld: integer, title: varchar, description: varchar, userld: integer)<br>a Write the following queries in relational algebra.<br>i. Find the username of users who are from 'Muscat'.<br>i. Find the IDs of pictures which scores more than 2000 likes.<br>iii. Find IDs of pictures which descried as landscape.<br>b. Write SQL queries for the following statements.<br>i. Display all the picture's details in the decreasing order of their scores.<br>ii. Count and display the number of pictures posted by each user.<br>iii. Add the given new user's data into the Users table.<br>userld<br>userName<br>userCity<br>2536<br>User2021om<br>Muscat<br>Paragraph<br>Arial<br>3 (12pt)<br>T T TT<br>T T,<br>lil<br>

Extracted text: Question 14 Consider the following schema and answer the following questions: Users(userld: integer, userName: varchar, userCity: varchar) Comment(userld: integer, pictureld:; integer, score: integer, commentText: varchar) Picture(pictureld: integer, title: varchar, description: varchar, userld: integer) a Write the following queries in relational algebra. i. Find the username of users who are from 'Muscat'. i. Find the IDs of pictures which scores more than 2000 likes. iii. Find IDs of pictures which descried as landscape. b. Write SQL queries for the following statements. i. Display all the picture's details in the decreasing order of their scores. ii. Count and display the number of pictures posted by each user. iii. Add the given new user's data into the Users table. userld userName userCity 2536 User2021om Muscat Paragraph Arial 3 (12pt) T T TT T T, lil

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here