Wednesday, August 22, 2012

ER MODEL Design

Database Design in OLTP:-
-------------------------
* 2 dimensional
* Normalized
* Entity Relationship Model
---------------------------------------------
How to Design ER Model?
---------------------------------------------
Step 1:-
--------
Define the Business/Concept/Business Process/System:-
---------------------------------------------
"XYZ Co is supermarket with 200 employess, having branches in different locations, we deal with different products, we have lot of customers generating the bills in different branhces."
Step 2:-
--------
Identify the Entities in the Business:-
---------------------------------------
- By using Noun Phrase approach.
1) employess
2) branches
3) Products
4) Customer
5) Bills
Step 3:-
--------
Draw the Entity diagrams:-
-------------------------
Step 4:-
--------
Convert each entity diagram into a Table:-
------------------------------------------
Step 5:-
-------
Form the Intersection Entity/table:-
-----------------------------------
Step 6:-
-------
Normalize all the tables (Entity Tables and Intersection entity table ).
6.1) Indentify the K.c and N.K.c of a table.
6.2) Whether all N.K.c are dependent/related on the Primary Key or not.
 * If N.K.C are not dependent on the Complete Primary Key then split the N.K.C into other table and connect Primary Key and Foreign Key.
6.3) Understand the Relationship between N.K.c and K.c and draw the entity relationship diagrams.
 * if N.K.C is related to K.c as 1:M then split the N.K.C into other table and connect with Primary Key and Foreign Key.
 * if N.K.C is related to K.c as 1:1 then store the N.K.C in the same table.
 * if N.K.C is related to K.c as M:M then split the N.K.C into other table and connect with Primary Key and Foreign Key.
---------------------------------------------
Points to be noted:-
--------------------
* Interscetion Entity:- Table which stores all the intersection data.
* Stronger Entity :- are those which are directly connected to the Intersection Entity.
* Attributes of Stronger Entity:- Tables which are connected to the stronger entity.
ER Model:-
---------
* Different entities(Tables) playing in the Business stored in different tables connected with PK and FK.
* It will have Interscetion Entities, Stronger Entities,Attributes of Stronger Entities.
* ER model is Normalized.
---------------------------------------------

Labels: , , , , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home