Entity-Relationship Diagram (Model) : Relationships Between Entities 1. One-to-One
Entity-Relationship Diagram (Model) : Relationships Between Entities 1. One-to-One
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
data is stored.
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
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.
Normalization of a Database is achived by following a set of rules called ‘forms’’ in creating database
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 :
Example:
Converted into :
3NF and all tables in the database should be only one primary key.