Entity Relationship Modeling (ERM)
a technique used to analyze & model the data in organizations using an Entity Relationship (E-R) diagram.
Database Management System 1
Isaac M Morallo – MAITE LPU - Laguna
an aggregation of a number of data elements each data element is an attribute of the entity
Introduced by Peter Chen in ‘75 now widely used You’ll find them in: Structured Systems Analysis and Design Methodology (SSADM) Information Engineering (IE) Multiview Yourdon/DeMarco.
a class of entities with the same attributes
an association between two or more entities that is of particular interest
Why use ER Diagrams ?
provides a global quick reference to an organization’s data structures. can be used individually to design an Information System’s (IS) data structure can be used with Data Flow Diagrams to provide a more comprehensive IS logical design.
ERD Development Process
Identify the entities Determine the attributes for each entity Select the primary key for each entity Establish the relationships between the entities Draw an entity model Test the relationships and the keys
A Simple Example
Identify the entities
Any entity can be classified in one of the following categories: Regular : any physical object, event, or abstract concept that we can record facts about.
STUDENTs attend COURSEs that consist of many SUBJECTs. A single SUBJECT (i.e. English) can be studied in many different COURSEs. Each STUDENT may only attend one COURSE.
any entity that depends on another entity for its existence.
Determine the Attributes
Every Entity has attributes. Attributes are characteristics that allow us to classify/describe an entity e.g., entity STUDENT has the attributes: student number name date of birth course number
Certain attributes identify particular facts within an entity, these are known as KEY attributes. The different types of KEY attribute are: Primary Key
Composite Primary Key
One attribute whose value can uniquely identify a complete record (one row of data) within an entity.
Composite Primary Key
A primary key that consists of two or more attribute within an entity.
A copy of a primary key that exists in another entity for the purpose of forming a relationship between the entities involved.
Entities and Attributes Entities are specific objects or things in the mini-world that are represented in the database. For example the EMPLOYEE Hulya Avsar, the Research DEPARTMENT, the GIS PROJECT Attributes are properties used to describe an entity. For example an EMPLOYEE entity may have a Name, TC number, Address, Sex, BirthDate A specific entity will have a value for each of its attributes. For example a specific employee entity may have Name='Cem Yilmaz', TCN='123456789', Address ='Uzun sk No:40 Kadikoy Istanbul Turkey', Sex='M', BirthDate='09-JAN-70‘ Each attribute has a value set (or data type) associated with it – e.g. integer, string, subrange, enumerated type, …
Types of Attributes
Each entity has a single atomic value for the attribute. For example, TCN or Sex.
Entity Types and Key Attributes
Entities with the same basic attributes are grouped or typed into an entity type. For example, the EMPLOYEE entity type or the PROJECT entity type.
The attribute may be composed of several components. For example, Address (Apt#, House#, Street, City, State, ZipCode, Country) or Name (FirstName, MiddleName, LastName). Composition may form a hierarchy where some components are themselves composite.
An attribute of an entity type for which each entity must have a unique value is called a key attribute of the entity type. For example, TCNo of EMPLOYEE.
A key attribute may be composite.
For example, course no and department code together constitutes a key like CENG 302...
Please join StudyMode to read the full document