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

79 views2 pages
Cmpt%354%%Assignment%2%(Due:%Feb%23rd%3:00pm%in%CSIL%dropbox)%
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!(within!reason).!
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 half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers