CMPT 354 Chapter Notes - Chapter 2: Relational Calculus, Relational Algebra
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