Create a conceptual data model, using crow`s foot notation for the

advertisement
DES715 In Class Exercise
Exercise 1
Part 1. Using the notation used in class, show the functional dependencies and normalize up to 3NF.
Clearly label your steps 1NF, 2NF and 3NF and clearly show PKs and FKs and give each table a
meaningful name. Draw the relational model in MSVisio to see if your tables are correct.
The hotel “Blue Moon’ wants to keep records about a guest’s accommodation. They want to collect the
following information (data sample):
Guest’s Name
Guest’s birth date
Room Number
Arrival date
Departure date
Room Type
Room Class
Rent Price per day
Room description
Ray Small
Amy Big
Don Little
04/15/1960 03/01/90
03/01/90
301
301
303
01/12/2001 01/20/2001 01/20/2001
01/20/2001 01/21/2001 01/23/2001
Double-luxe Double-luxe Luxurious
2 bedroom
2 bedroom
Suite
$275
$275
$600
Located in the West wing. Nice view of lake. Balcony.
TV set, video, fridge, iron and ironing board.
Business rules:
1. Assume that Room Number is a unique identifier of the room.
2. Assume that a guest takes only one room for their accommodation.
3. The next guest will be placed in the room after the departure of the previous guest.
4. Room Type defines the rent price.
5. Room description is a long text.
Part 2. Change business rule 2 to assume that a guest can take more than one room. Modify the
database design.
DES715 In Class Exercise
Exercise 2
Using the notation used in class, show the functional dependencies and normalize up to 3NF. Clearly
label your steps 1NF, 2NF and 3NF and clearly show PKs and FKs and give each table a meaningful
name. Draw the relational model in MSVisio to see if your tables are correct.
EMP_CODE
LAST_NAME
EDUCATION
DEPT_CODE
DEPARTMENT
DEPT_MANAGER
JOB_CLASS
TITLE
DEPENDENTS
BIRTH_DATE
HIRE_DATE
TRAINING
BASE_SALARY
1003
Willaker
HS, BBA, MBA
MKTG
Marketing
Jill H. Martin
23
Sales Agent
Gerald (spouse), Mary (daughter), John (son)
12/23/65
10/14/94
Level 1, Level 2
$32, 255
Assume that BASE_SALARY is defined by JOB_CLASS and that EMP_CODE and DEPT_CODE is
the composite primary key for the view.
Download