CMPT 354 Chapter Notes - Chapter 2: Relational Calculus, Relational Algebra

70 views4 pages
Cmpt%354%%Assignment%2%%
This%is%the%same%day%as%midterm:%Please%do%not%leave%until%last%minute%:)%
%
Question%1:%(25%marks)%
%
Continuing%from%the%theme%in%the%previous%assignment,%consider%an%ERD%for%a%bakery%Database:%%
%
%
where:%
House%street,%House%city,%specialty,%all%names%are%arrays%of%20%characters.%
Driver%class,%SIN,%Sid,%Did,%cid,%mid,%Phone%number,%and%unionID%are%arrays%of%10%characters.%
Size,%Trunk%Capacity,%and%House%number%are%integers.%
Delivery%Date%is%a%day/month/year%%
%
a) Write%a%series%of%SQL%CREATE%TABLE%statements%for%this%database.%%Use%the%least%amount%of%
tables%possible.%
b) Discuss%Alternative%translations%(that%may%possibly%use%more%tables).%%Indicate%a%situation%when%it%
would%be%more%beneficial%to%use%such%a%representation.%Note:%Please%discuss%only%the%
alternatives%that%make%logical%sense.%
%
% %
Employees
Name unionID
SIN
ISA
Baker
specialty
Delivery
Boy
Driver
Class
Car
Desserts
Did Name
Size
Type
lives
contains
Makes
drives
delivery
PhoneHouse
City number
Street
number
Store
Sid Name
Model
cid
mid
Trunk
Capacity
Delivery
Date
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows page 1 of the document.
Unlock all 4 pages and 3 million more documents.

Already have an account? Log in

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
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers