CS348 Study Guide - Midterm Guide: Unique Key, Relational Algebra, Foreign Key

241 views4 pages

Document Summary

Write all your answers neatly in the answer booklet provided. Be sure your name and id number are on the cover of the booklet. Vin is required to take a unique value for each car tuple. create table car ( Year integer check(year >= 1900 and year <= 2011), Vin char(20) unique, primary key (licencenum, province: [24 marks in total] The nutritionists union has created the following relational database schema to maintain information about foods, including their nutritional value and health implications: Supplies ( food , nutrient , amount ) Which foods provide (or exceed) the minimum recommendation of iron? select food from supplies s, requirement r where s. nutrient = r. nutrient and amount >= minimum_recommendation and s. nutrient = iron . Winter 2010: [7 marks] write an sql query to answer: Which foods provide (or exceed) the minimum recommendation of iron? food( nutrient= iron and amount >= minimum_recommendation(supplies. Requirements) : [5 marks] use relational algebra to express the query:

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Questions