Académique Documents
Professionnel Documents
Culture Documents
X Y b) Y Z c) Z Y d) Y X e) Z X f) X Z g) XY Z
R
X
3
4
5
6
7
3
Y
a
d
c
a
c
b
Z
e
e
h
e
h
f
2. TICO has asked you to model a relational database for production of receipts
for his restaurant. The information hell record is outlined below. Go through
the normalisation process with this database, satisfying yourself that you have
reached the optimum solution for TICOS chain of restaurants. Declare your
final set of relations and justify your design in terms of the keys you have
chosen.
Receipt
#
1
1
1
2
2
TICOS
Dat
e
2/2/07
2/2/07
2/2/07
3/2/07
3/2/07
CustI
D
A
A
A
B
B
CreditCar
d
222
222
222
333
333
Item
#
1
2
3
2
3
Qt
y
2
1
1
2
1
Price(
)
10
7
5
7
5
Prod#
Desc
Qty
Supplie
r
Tel
1
1
2
2
2
3
1
2
1
2
3
3
Disk
CD
Disk
CD
Mouse
Mouse
3
5
1
1
1
1
X
Y
X
Y
X
X
101
223
101
223
101
101
12/1/01
12/1/01
13/1/01
13/1/01
13/1/01
13/1/01
1
1
2
2
2
1
Ord#{fk}
1
1
2
2
2
3
Prod#{fk}
1
2
1
2
3
3
Cust#
1
2
Name
Jones
Black
Supplier
X
Y
Tel
101
223
Jones
Jones
Black
Black
Black
Jones
Qty
3
5
1
1
1
1
Ord#
Date
1
2
3
12/1/01
13/1/01
13/1/01
Prod#
Desc
1
2
3
Disk
CD
Mouse
Cust#{fk
}
1
2
1
Supplier{fk
}
X
Y
X
From the lectorial you saw the associated ERM for this scenario below (in
addition, the attribute QTY would belong to the relationship HAS):
Customer
makes
1..1
0..*
Order
0..*
has
0..*
Product
despatches
1..*
1..1
Supplier
Change the Supplier in the bottom row to Y and the Tel to 223.
determine if any functional dependency has changed.
Re-normalise the data starting from 1NF (look back at the lectorial slides
to find out the state of the normalisation process after 1NF)
Can you re-draw the ERM diagram now from your new tables? What has
changed as a result of this change in functional dependency?
Advisor
Ball
Brown
Andrews
Black
Ball
Subject
Databases
Java
HTML
Java
Databases
Grade
A
B
C
D
B
Name
Smith
Smith
Black
Black
White
White
Smith
Title
Abba The Movie
Jungle Book
Casablanca
Jungle Book
Hell Raiser
Psycho
Casablanca
Rental
2.50
2.00
2.50
2.00
2.50
3.00
2.50
CustName
Mary Watts
Mary Watts
Ron Wild
Ron Wild
Ron Wild
CarReg CarModel
F64 256 Fiat
D65 123 Fiesta
F64 256 Fiat
E78 425 Seat
D65 123 Fiesta
HireDate
01/07/97
01/08/99
08/07/96
24/08/98
09/11/99
ReturnDate
15/07/97
15/08/99
22/07/96
07/09/98
23/11/99
Rental
200
300
200
250
300
CoNo
CN27
CN59
CN27
CN59
CN59
CoName
Delta
Naxos
Delta
Naxos
Naxos