E-R Diagram and Normalisation of Database

Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

E-R Diagram and Normalisation of Database :

E-R Diagram and Normalisation of Database BlackTShirt

Slide 2:

I started with my three main tables: tblcustomer, tblOrders and tblStock. The relationships I set up were as follows: Customers Orders Stock 1 : M M : M So far, I have established that: -One Customer can have many Orders -An Order can only belong to one customer -an Order may be for many stock items -one stock item may belong (or appear on) many different Orders A Normalised database Does not allow for Many To many relationships

Final E – R Diagram:

Final E – R Diagram All the relationships are now one to many between the entities. This gets rid of any duplication of inconsistencies in the database structure Customers Orders Stock Order Line A fourth table was added “Order Line”. One line in an order consists of several Items ordered. Explaining relationships: -An Order has many order lines -An Order Line is for one item of stock only -A stock item may be visible (or appear) on MANY different order lines. (different orders)

Normalised tables will look something like this: (below):

Normalised tables will look something like this: (below) Source: A level ICT, Heathcote