Professional Documents
Culture Documents
Pet Id Pet Name Pet Type Pet Age Owner Visit Date Procedure
Pet Id Pet Name Pet Type Pet Age Owner Visit Date Procedure
Normal Form
Below data is used to describe information of treatment for pets at a pet medical center. Using decomposition
technique to model these data into relational model basing normal forms. You should start from 1NF to 3NF.
2. Invoice
PET ID PET NAME PET TYPE PET AGE OWNER VISIT DATE PROCEDURE
INVOICE # 987
Z5Z 6G6
TOTAL 54.00
1NF:
2NF
1
8 8
PET I PET NAM PET TYP PET AG OWNER PROCEDURE_ID PROCEDURE_ Description
D E E E 01 RABIES VACCINATION
246 ROVER BIRD 12 SAM COOK 05 HEART WORM TEST
1
298 SPOT CAT 2 TERRY KIM 08 TETANUS VACCINATION
341 MORRIS CAT 4 SAM COOK 10 EXAMINE and TREAT WOUND
519 PET
TWEEDY BIRD
ID PROCEDURE_ID2 VISIT TERRY
DATE KIM 12 EYE WASH
246 01 JAN 13/2002 20 ANNUAL CHECK UP
246 10 MAR 27/2002
1 8
246 05 APR 02/2002
298 08 JAN 21/2002
298 05 MAR 10/2002
341 01 JAN 23/2001
341 01 JAN 13/2002
519 20 APR 30/2002
519 12 APR 30/2002
Câu 2:
INVOICE_ID INVOICE_ OWNER OWNER Pet_id Pet_name Procedure Amount
DATE _ADDRESS
987 Jan Mr.Richard 123 This Street, 01 Rover Rabies 30.00
13/2002 Cook My City, Ontario Vaccination
1NF
2NF
8 8 1
1
INVOICE_ID Pet_id Procedure Amount
3NF:
1
1
8
1
LAB2_2
Exercise 1. You have been given a form which shows the details of technical jobs carried out for
different schools by members of staff in the local college. You will note that one job may require
input from more than one member of staff. Each member of staff belongs to a department within the
college and the number of hours worked on each job along with the date the job was undertaken are
noted. A member of staff may work on more than one job on any given date.
The college would like to set up a relational database to manage the allocation of staff to jobs and
keep a more efficient record of the number of hours worked for each school within the college.
Your task is making the database to 3NF (specify step by step: determine FDs, normalization,..).
TechNo TechName DeptId Department JobNo Date SchoolID School Hoursworked
345 Smith, Alan 2 Helpdesk 3440 18/9/07 346 Bus & Man 1.5
320 Young, Jill 3 Labs 3440 18/9/07 346 Bus & Man 4
Exercise 2. Based on the form below, design a database suitable for storing information.
(Tên cơ sở tư vấn)
(Ma số:….)
Sô đăng ky tư vân
Ma dịch vu
giới thiêu:
0 - Không 1 - Chăm soc 2 - Chăm soc 3 - Chăm 4 - Dự phòng lây nhiễm
giới thiêu điều trị ST1 soc lao mẹ sang con
5- 6 - Chăm soc 7 - Tiếp cân công 8 - Nhom
KHHGD y tế khác đồng hỗ trơ 9 - Cai nghiên
DeptId Department
Bài 1:
1 Engineering
Department (key: DeptId)
3NF: Tech (key: TechNo) 1
8 2 Helpdesk
Job_info(key:
1002 JobNo)
12/9/07
1003 12/9/07
560 Design
1
TechNo JobNo SchoolID Hoursworked
1
8 8 8
Hoursworked (key: TechNo + JobNo+ SchoolID)
Bài 2:
8
Ma đăng ky Ngày đăng ky Giơ đăng ky Ma dịch vu Ma tư vấn viên
Đăng ky
key: Ma đăng ky Xét nghiệm
Dịch vu
8
Key:1 Ma khách hàng + Ma xét
nghiệm
key: Ma dịch vu
1
Khách hàng
1 Ma khách hàng Tên khách hàng Năm sinh Giới tính Địa chỉ
key: Ma khách hàng