Sale!

CS 281 Homework #1 solution

$30.00 $25.50

Category:

Description

5/5 - (8 votes)

1. Draw the E/R Diagram that corresponds to the given relational schema. Write any
assumptions that you make. You may use draw.io or draw it on a paper. (10 points)
For rest of the questions, write the corresponding Relational Algebra expression to given
queries. (10 points each)
2. Find the name of products that are in category “Dairy” or “Vegetable”. (Note that these are
the names of the categories)
3. Find the name, the price and the expiration date of the products that are sold by the supplier
whose SID is equal to “836”.
4. Find the name of products that are sold by both “Barilla” and “Filiz”. (Note that these are
the names of the suppliers)
5. Find the product name, the stock date, and the amount of the products that are sold for a
price less than 50 TL.
6. Find the product name and the amount of the products whose expiration date is today.
7. Find the name and the origin city of the oldest supplier. (The one with the smallest date of
foundation)
8. Find the name of the suppliers that sell products from all categories.
9. Find the product name, the stock date, the price, and the amount of the products that are
sold by a supplier in “Ankara” or “İstanbul”.
10. Find the name and the price of the most expensive product in category “Toy” sold by the
supplier “Adore”. (Note that “Toy” is the name of the category and “Adore” is the name of
the supplier)
By doing this homework, you agree that you would follow Bilkent University’s policy on
plagiarism, and you accept that all the solutions belong individually to you. You also accept
that in case of an act of plagiarism, you would not get any points from this homework, and
disciplinary action will be taken.
CS 281 Homework #1