urgent
LOGICAL AND PHYSICAL DATA MODEL
LOGICAL DATA:
eTSSSSSsSSS
INHOUSE PET SITTING
Dogs
Cats
Fish
Birds
DAILY PET SITTING
Dogs
Cats
Fish
Birds
EMPLOYEE
PK Employee ID
Employee Name Employee Address
Hourly Rate
Pet Certified
OWNER
PK Owner ID
Owner Name
Owner Address
Bill Info
Contact No
PET
Pet Type
Likes Dislikes
Name
Medications
PHYSICAL DATA:
Owner
Owner ID num(10) <pk>
Owner Name varchar (20)
Owner address varchar (100)
Bill Info varchar (50)
Contact No number (10)
Pet
Pet Type varchar (20)
Pet Name varchar (20)
Medication varchar (20)
Likes Dislikes varchar (20)
In House pet sitting
Dogs varchar (15)
Cats varchar (15)
Fish varchar (15)
Birds varchar (15)
Daily pet sitting
Dogs varchar (15)
Cats varchar (15)
Fish varchar (15)
Birds varchar (15)
Employee
Employee ID num (10) <pk>
Employee Name varchar (40)
Employee Address varchar (100)
Hourly Rate num (5)
Pet Certified varchar (15)
RELATIONSHIPS
1. one INHOUSE pet sitting can have many PET. Many PET can have in one IN HOUSE pet sitting.
2. one Employee can have many DAILY pet sitting. Many DAILY pet sitting has one and only one Employee.
3. one Employee can have many DAILY pet sitting. Many DAILY pet sitting has one and only one Employee.
4. one Daily pet sitting can have many PET. Many PETS can have in one Daily pet sitting.
5. one OWNER can have one to many PET. PET is for one and only owner.
3.A table is said to be in 3NF form if it satisfies two conditions
> It must be in 2NF
> Transitive functional dependency of nonprime attribute on any super key should be removed.
Employee ID | Employee Name | Hourly Rate | Pet Certified |
51291 | Ahmed | 50$ | Dog |
12692 | Ashok | 25$ | Fish |
11798 | Shwetha | 25$ | Birds |
Since there is a partial dependency i.e., Hourly Rate and Pet Certified are dependent on Employee ID
We have to divide the tables into two tables removing dependency
Employee ID | Hourly Rate | Pet Certified |
51291 | 50$ | Dog |
12692 | 25$ | Fish |
11798 | 25$ | Birds |
Employee ID | Employee Name |
51291 | Ahmed |
12692 | Ashok |
11798 | Shwetha |
We have the same dependency issue, therefore again break the tables with no functional dependency
Employee ID | Hourly Rate |
52165 | 50$ |
15415 | 25$ |
45654 | 25$ |
Employee ID | Pet Certified |
52165 | Dog |
15415 | Fish |
45654 | Birds |