Answer To: T1 2020 ISY1002 ISY103 DBM Group Project Outline.pdf Unit ISY1002/ISY103 Database Management for...
Neha answered on May 31 2021
59253/~$Report.docx
59253/ER Diagram.png
59253/Presentation.pptx
Submitted By:-
AMC Database
Entity Relationship Diagram
Normalization
It is important to normalize all the tables in a database as it helps to organise the data available in the database using a predefined format. The normalization helps in insertion, updating and deletion in the tables without any anomalies. It removes the redundancy. The values are stored in rows and columns and also removes the replicated values.
First normal form
Every column has atomic value and unique name.
Second normal form
To get the database in second normal form it is important to remove all the partial dependencies from it. When a non-attribute key has dependency on some part of a candidate key then it is known as partial dependency.
Third Normal Form
There should be no transitive dependency in the database. It helps in removing the data redundancy and data integrity.
Relational Schema
Patron (PatronId, FirstName, LastName, Address, Phone)
Shop (ShopId, Name, PhoneNo, Email, Fax, Street, Suburb, State, Postcode)
Supplier (SupplierId, Name, Address,Phone,Email)
Product (ProductId, Name, Brand, Description, Price, SupplierId)
Inventory (InventoryId, ShopId, ProductId, Available, Ordered)
Department (DepartmentId, Name, ShopId, Email, Phone)
Employee (EmployeeId, EmpName, PhoneNo, Email, Address, TFN, Salary, JoiningDate, DepartmentId, EmployType)
OrderDetail (OrderId, Date, ProductId, Quantity, PatronId)
PaySlip (PayslipId, ShopId, hours, employeeId, grosspay
What I learnt
While working on this report, I learnt about the different requirements of normalization and its importance while designing the database. There are 9 tables in this database which are related with each other. Every table has a primary key which is used by other tables. I tried to eliminate the redundancy and data integrity from the database and all the tables satisfy the requirements of third normal form.
Thank You
59253/Report.docx
Part A: ERD for AMC
Part B: Normalisation
It is important to normalize all the tables in a database as it helps to organise the data available in the database using a predefined format. The normalization helps in insertion, updating and deletion in the tables without any anomalies. It removes the redundancy. The values are stored in rows and columns and also removes the replicated values.
First normal form
Every column has atomic value and unique name.
Second normal form
To get the database in second normal form it is important to remove all the partial dependencies from it. When a non-attribute key has dependency on some part of a candidate key then it is known as partial dependency.
Third Normal Form
There should be no transitive dependency in the database. It helps in removing the data redundancy and data integrity.
Part C: Relational Schema
Patron (PatronId, FirstName, LastName, Address, Phone)
Shop (ShopId, Name, PhoneNo, Email, Fax, Street, Suburb, State, Postcode)
Supplier (SupplierId, Name, Address,Phone,Email)
Product (ProductId, Name, Brand, Description, Price, SupplierId)
Inventory (InventoryId, ShopId, ProductId, Available, Ordered)
Department (DepartmentId, Name, ShopId, Email, Phone)
Employee (EmployeeId, EmpName, PhoneNo, Email, Address, TFN, Salary, JoiningDate, DepartmentId, EmployType)
OrderDetail (OrderId, Date, ProductId, Quantity, PatronId)
PaySlip (PayslipId, ShopId, hours, employeeId, grosspay)
Table Patron
Column Name
Data Type
Length
Key Constraints
PatronId
Bigint
Primary
firstname
varchar
50
lastName
varchar
50
Phone
varchar
20
Address
varchar
100
Table Shop
Column Name
Data Type
Length
Key Constraints
ShopId
Bigint
Primary
Name
varchar
50
PhoneNo
Varchar
50
Email
Varchar
50
Fax
varchar
50
Street
Varchar
30
Suburb
Varchar
30
State
Varchar
30
Postcode
int
Table Supplier
Column Name
Data Type
Length
Key Constraints
SupplierId
Bigint
Primary
Name
varchar
50
Address
varchar
100
Phone
varchar
20
Table Product
Column Name
Data Type
Length
Key Constraints
ProductId
Bigint
Primary
Name
varchar
50
Brand
varchar
50
Description
varchar
100
Price
int
SupplierId
Int
Foreign
Table Inventory
Column Name
Data Type
Length
Key Constraints
InventoryId
Bigint
Primary
ShopId
Bigint
Foreign Key
ProductId
Bigint
Foreign Key
Available
int
Ordered
int
Table Department
Column Name
Data Type
Length
Key Constraints
DepartmentId
Bigint
Primary
Name
varchar
50
ShopId
Bigint
Foreign Key
Email
Varchar
50
PhoneNo
Varchar
50
Table Employee
Column Name
Data Type
Length
Key...