


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Homework Assignment 1 – Database Systems CS 461Total Points: 100Due Thursday January 22ndPost your solutions to WebCT no later than 11:55 PMUse the following relations to answer the questions. All questions may not have a valid answer. If they do not, indicate why.An ID field can be between 1 and 6 digits.
Products
ID_PRODUCT
PRODUCT_NAME
SKU^
Price
1 Zojjed!
WALK-
2 Race Walk Like a Champion
WALK-
3 The Evolution of Race Walking WALK-
4 Race Walking Done Right
WALK-
5 Walk Like an Athlete
WALK-
6 Non Existent Fountains
TFG-
7 Race Walk Like a Champion
WALK-
8 Olympic 50K
WALK-
RefProductCategories ID_CATEGORY
CATEGORY_DESC 1 Walking 2 Photography 3 Fiction RefProductTypes
ID_PROD_TYPE
PROD_TYPE_DESC 1 Book 2 DVD 3 T-Shirt 4 Photograph
ProductCategories ID_PRODUCT
ID_CATEGORY 1 3 2 1 3 1 4 1 5 16 27 18 18 2 ProductTypes ID_PRODUCT
use the join conditions learned in class) (i.e. inner, natural, left, right, and full)
(10 points)6. Write a query in relational algebra to return id’s of all products with no product categories assigned to them.(10 points)7. Write the query, in relational algebra, to names of the products that have a category of “Walking” and also have a product type of“Book”.(10 points)8. Write the query, in relational algebra, to get a complete list of products (NAME, SKU, PRICE), and the descriptions of allcategories associated with them.(10 points)9. Write the query, in relational algebra, to get the names of the products that are assigned to the least product types.(6 points)10. Write a query, in relational algebra, to return the Product that have Product Types but not Product Categories.