Normalization a) Map the ERD, from the sample solution, into a set of relations
ID: 3749506 • Letter: N
Question
Normalization a) Map the ERD, from the sample solution, into a set of relations in at least Third Normal Form (3NF). You must ensure that your relations meet 3NF. There is no need to show your working. b) Select any two of your relations from the previous step, 1a), and perform the following for each of those two relations: • List all the functional dependencies exist in the relation. • Demonstrate that the relation meets Third Normal Form (3NF). For your help, an example for a Student relation’s 3NF justification has been provided below: STUDENT (StudentID, Name, Address, DateOfBirth) i. The primary key is StudentID which identifies a student. There will be one student name per Student ID because only one name is recorded for each student. Even though a student may have multiple addresses (e.g. a home address and a work address), the case study states that there is a need to record the home address only and hence there will be only one address for each student. There will be only one date of birth for each student. Thus, there are no repeating groups. Hence, this relation is in 1NF. ii. The primary key is StudentID. This is the only candidate key since Name is not guaranteed to be unique (two different students may have the same name). Address is also not guaranteed to be unique. This means that Student ID functionally determines every other attribute in the table. There is a single valued simple candidate key (StudentId) and therefore no partial dependencies are possible. Hence, the relation is in 2NF. iii. Name cannot be used to functionally determine any other attribute in the table since two different students may have the same name; likewise for address and date of birth. Therefore there are no transitive dependencies in the table. Therefore it meets the requirements of first, second and third normalform.
Assignment 1 Sample Solution ER model-QRentals database system LOCATION LocationName Pick up Drop off CUSTOMER CAR RENTAL FullName BirthDate RegoNo Make&Model NumofSeats Policy InsurerName RentalD StartDate EndDate [Cost] StartDate Lice nseNo Associated Belong to Cust Type-" BOOKING VEHICLE CATEGORY ReservationID Description BookingDate CategorylD Cate goryName Daily hire rate CORPORATE INDIVIDUAL Orgnization Name ABN Personal Life Insured Travel special deal Process EMPLOYEE Full Name BirthDate Phone SkilllevelExplanation / Answer
a) This ER Diagram is made based on Crow's Foot system
set of relations in given ER diagram (Relation sets based on provided relation among entity sets
* emp_process_booking (reservationid)
* booking_require_vehicle (reservationid)
* customer_makes_booking (reservationid)
* vehicle_belong_car (regdno)
* booking_associated_rental (reservationid)
* rental_pickup_location (rentalid)
* customer_makes_rental (rentalid)
* car_rent_rental (rentalid)
* car_park_location (regdno)
* insurance_insured_car (regdno)
For above relation sets, given primary key can identify itself and other entity's all the attributes.
or to identify these attributes, simply the Primary key of one table is kept as foreign key in the other table. Foreign key is the key in Table A which can uniquely identify the attributes of Table B (primary key of Table B is foreign key in Table A)
* Employee(EmployeeID,FullName,BirthDate,SkillLevel,AnnualSalary)
* Booking (Reservationid,Description,BookingDescription,EmployeeID) --- here employee id is foreign key
similarly we can do for other entities,
Vehicle(CategoryID,CategoryName,DailyHireRate)
Car(RegdNo,Make&Model,NumOfSeats,ManufacturedYear,Carriage,CategoryID)
b) Taking two relation sets
* emp_process_booking (reservationid)
here Booking entity has ReservationID as Primary key and Employee has EmployeeID as Primary Key.
Functional Dependencies :-
EmployeeID -> FullName
EmployeeID -> BirthDate
EmployeeID -> SkillLevel
EmployeeID -> AnnualSalary
here EmployeeID is the only candidate key
Using full name, birth date , skill level and annual salary, none of the other attributes can be classified uniquely since these can be duplicate. Hence, this is 3NF relationship.
* vehicle_belong_car (regdno)
here CategoryID and RegdNo are primary keys for Vehicle and Car respectively. It has 1:0..MANY relationship, hence :-
CategoryID -> CategoryName
CategoryID -> DailyHireRate
No other two attributes can be single or multiple used to identify the tuple uniquely, therefore only candidate key is CategoryID , hence 3NF.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.