You are on page 1of 5

entity-relationship diagram (model)

An entity relationship model, also called an entity-relationship (ER) diagram, is a graphical representation of

entities and their relationships to each other, typically used in computing in regard to the organization

of data within databases or information systems. An entity is a piece of data-an object or concept about which

data is stored.

Relationships Between Entities


A relationship is how the data is shared between entities. There are three types of relationships between entities:

1. One-to-One
One instance of an entity (A) is associated with one other instance of another entity (B). For example, in a

database of employees, each employee name (A) is associated with only one social security number (B).

2. One-to-Many
One instance of an entity (A) is associated with zero, one or many instances of another entity (B), but for one

instance of entity B there is only one instance of entity A. For example, for a company with all employees working

in one building, the building name (A) is associated with many different employees (B), but those employees all

share the same singular association with entity A.


3. Many-to-Many
One instance of an entity (A) is associated with one, zero or many instances of another entity (B),
and one instance of entity B is associated with one, zero or many instances of entity A. For example,
for a company in which all of its employees work on multiple projects, each instance of an employee
(A) is associated with many instances of a project (B), and at the same time, each instance of a
project (B) has multiple employees (A) associated with it.

many to many entity relationship diagram.

ER Diagram Symbols
In an ER diagram, symbols are commonly used to represent the types of information. Most diagrams will use the

following:
 Boxes represent entities.
 Diamonds represent relationships
 Circles (ovals) represent attributes.
Normalization:
Database nornalization is a database schema design technique by which an existing schema
is modify to minimize redundancy of data.

Some Fact About Database Normalization:


1.The word normalization and normal form refers to the structure of database.

2.Normalization was developed by IBM researcher E.F. Codd In the 1970s.

3.Normalization increases the clarity in organizing data in Database.

Normalization of a Database is achived by following a set of rules called ‘forms’’ in creating database

There are 5 rules mentioned bolow:


1st Normal Form(1NF):
Each column is unique.

Example:

Converted into
2nd Normal Form(2NF):
The entity should be considered already in 1NF and all attributes within the entity should
dependend solely on the unique idendifier of the entity.

Example:

Converted into :

3rd Normal Form(3NF):


The entity should be considered already in 2NF and no column entry should be dependent on any
other entry(value) other than the key for the table.

If such an entity exits move it outside into a new table.

3NF is achived are considered as the database is normalizated.

Example:
Converted into :

Boyce & Codd(BCNF):

3NF and all tables in the database should be only one primary key.

4th Normal Form(4NF):


Tables cannot have multi-valued dependencies on primary key.

5th Normal Form(5NF):


Composite key shouldn’t have any cyclic dependencies. Well this is a highly simlifiex
explanation for Database Normalization. One can study this process extensively
though.After working with databases for some time you’ll automatically create Normalized
database As its logical and practical.

You might also like