Draw a Relational diagram of 3NF due to the following 1NF ER Diagram.
Question
Draw a Relational diagram of 3NF due to the following 1NF ER Diagram.
Summary
Because each table has a unique ID, the given schema is already in 1 NF.
Because each table had an ID, we treated it as unique and renamed it to match the table.
In the table above, there are partial and functional relationships. We must first convert the given schema to 2NF before we can convert it to 3NF. To accomplish this, we must first identify and eliminate any transitive and partial dependencies from the schema.
Explanation
The primary key for the Customer table is ID (Customer ID).
There is no such thing as a foreign key.
ID->Name, ID->Address, ID->City, ID->Gender, ID->Phone, ID->Civil ID Functional Dependency: ID->Name, ID->Address, ID->City, ID->Gender, ID->Phone, ID->Civil ID
There is no transitive or partial dependency.
Car, for the table
ID (Car ID) is the primary key.
There is no such thing as a foreign key.
Car ID->Model, Car ID->Year, and Car ID->Type are functional dependencies.
This table has no partial or functional dependencies.
ID (Rental ID) is the primary key for table rentals.
Car ID is a foreign key.
Dependency on Function: Rental ID->Type, Rental ID->To date, Rental ID->From date, Rental ID->Rental ID->Rental ID->Rental ID->Rental ID->Rental ID->Rental Car ID
There is no transitive or partial dependency.
Registration ID is the primary key for the table Registration.
Dependencies on functionality:
1. Registration->Customer
2. Registration->Rental Type
3. Registration->Car Type
4. Registration->Year
The table contains transitive dependencies. As a result, we divided the table as follows:
Registration (Registration ID, Year)
Registration_Details( Customer_ID, Registration_ID, Rental_ID)
Customer(ID, Name, Address, City, Phone, Civil ID) is the table in 3NF.
Vehicle (Vehicle ID, Model, Type, and Year)
Rental (Rental ID, Car ID, Type, To date, From date)
Registration (Registration ID, Year) (Registration ID, Year) (Registration ID, Year)
Customer ID, Registration ID, Rental ID)Registration Details(Customer ID, Registration ID, Rental ID)Registration Details(Customer ID, Registration)
Also, read check the python code below that doesn’t work properly, adjust it, and explain?