Professional Documents
Culture Documents
RELATIONS
RELATIONS
Properties of Relations
1.
2.
3.
4.
5.
ThrivingAndLiving.blogspot.com
RELATIONS
Name
987
John
988
Miranda
DateVisit
Physician
Symptom
02/26/06
Dr. Smith
Nervousness
02/27/06
Dr. Alvarez
Panicky
02/26/06
Dr. Hope
Depression
DateVisit
Physician
Symptom
987
John
02/26/06
Dr. Smith
Nervousness
987
John
02/27/06
Dr. Alvarez
Panicky
988
Miranda
02/26/06
Dr. Hope
Depression
RELATIONS
Name
DateVisit
Physician
Symptom
987
John
02/26/06
Dr. Smith
Nervousness
987
John
02/27/06
Dr. Alvarez
Panicky
988
Miranda
02/26/06
Dr. Hope
Depression
RELATIONS
PATIENT
PatientNo
UNIQUE
DateVisit
Physician
Symptom
987
John
02/26/06
Dr. Smith
Nervousness
987
John
02/27/06
Dr. Alvarez
Panicky
988
Miranda
02/26/06
Dr. Hope
Depression
ThrivingAndLiving.blogspot.com
RELATIONS
DateVisit Name
Symptom
Physician
987
02/26/06
John
Nervousness
Dr. Smith
987
02/27/06
John
Panicky
Dr. Alvarez
988
02/26/06
Miranda
Depression
Dr. Hope
Name
DateVisit
Physician
Symptom
987
John
02/26/06
Dr. Smith
Nervousness
988
Miranda
02/26/06
Dr. Hope
Depression
987
John
02/27/06
Dr. Alvarez
Panicky
ThrivingAndLiving.blogspot.com
RELATIONS
ThrivingAndLiving.blogspot.com
RELATIONS
Problem No. 1: Determine the functional dependency notation and primary key
of the relation.
PATIENT
PatientNo Name
Address
0123
Ivy Goodings
Orange County, CA
0124
Janneth Virginia
San Francisco, CA
Solution:
Therefore relation is :
PATIENT(PatientNo, Name, Address)
Primary Key
ThrivingAndLiving.blogspot.com
RELATIONS
Problem No. 2: Determine the functional dependency notation and primary key
of the given table.
Composite key
GRADE SHEET
- primary key
CS121
A+
0456
CS122
A+
0458
CS121
0458
CS222
Solution:
Therefore
relation is :
ThrivingAndLiving.blogspot.com
RELATIONS
Dept
Salary
Training
0123
Ivy Goodings
EDP
30,000
JavaScrpt 3/1/2010
0123
Ivy Goodings
EDP
30,000
C#
3/5/2010
0124
Janneth
Virginia
HelpDesk
20,000
MySQL
3/1/2010
ThrivingAndLiving.blogspot.com
Training
Date
RELATIONS
Solution:
EMPLOYEE:
RELATIONS
Dept
Salary
Training
0123
Ivy Goodings
EDP
30,000
JavaScrpt 3/1/2010
0123
Ivy Goodings
EDP
30,000
C#
3/5/2010
0124
Janneth
Virginia
HelpDesk
20,000
MySQL
3/1/2010
PERSONNEL
Training
Date
EmpID Name
Dept
Salary
TRAINING
EmpID Training
0123
Ivy G.
EDP
30,000
0123
JavaScrpt
3/1/2010
0124
Janneth
Virginia
HelpDesk
20,000
0123
C#
3/5/2010
0124
MySQL
3/1/2010
ThrivingAndLiving.blogspot.com
TrainingDate
RELATIONS
PERSONNEL
HAS
TRAINING
minimum
Cardinality constraint specifies
the number of instances of one
entity that can (or must) be
associated with each instance
of another entity.
ThrivingAndLiving.blogspot.com
RELATIONS
Dept
Salary
Training
0123
Ivy G.
EDP
30,000
JavaScrpt 3/1/2010
0123
Ivy G.
EDP
30,000
C#
3/5/2010
0124
Janneth V.
HelpDesk
20,000
MySQL
3/1/2010
Training
Date
RELATIONS
EMPLOYEE
EmpID
Name
Gender
Branch
Code
Branch
Name
EMP01
Tom Parsons
BR01
Manila
EMP02
Anne Wells
BR02
Cebu
EMP03
Icee Almonds
BR01
Manila
ThrivingAndLiving.blogspot.com
RELATIONS
EMPLOYEE
EmpID
Name
Gender
Branch
Code
Branch
Name
EMP01
Tom Parsons
BR01
Manila
EMP02
Anne Wells
BR02
Cebu
EMP03
Icee Almonds
BR01
Manila
Solution:
EMPLOYEE:
Non-key
attribute
transitive dependent
ThrivingAndLiving.blogspot.com
RELATIONS
ThrivingAndLiving.blogspot.com
RELATIONS
EMPLOYEE
BRANCH
EmpID
Name
Gender
Branch
Code
Branch
Name
Branch
Code
Branch
Name
EMP01
Tom Parsons
BR01
Manila
BR01
Manila
EMP02
Anne Wells
BR02
Cebu
BR02
Cebu
EMP03
Icee Almonds
BR01
Manila
PERSONNEL
EmpID
Name
Gender
Branch
Code
EMP01
Tom Parsons
BR01
EMP02
Anne Wells
BR02
EMP03
Icee Almonds
BR01
ThrivingAndLiving.blogspot.com
is included at
BRANCH
( BranchCode, BranchName )
ThrivingAndLiving.blogspot.com
RELATIONS
RELATIONS
Reference
Hoffer, J, Prescott, M. and McFadden, F., Modern Database
Management 6th Edition, Pearson Prentice Hall 2002
Kendall, K., Kendall, J., Systems Analysis and Design
7th Edition, Pearson Prentice Hall 2008
ThrivingAndLiving.blogspot.com