- 1976 proposed by Peter Chen
- An ER diagram is widely used in database design
- Represent the conceptual level of a database system
- Describe things and their relationships at a high level
Basic Concepts
- Entity set – an abstraction of similar things,
- E.g:- cars, students
- An entity set contains many entities
- Entities are represented by means of rectangles.
- Rectangles are named with the entity set they represent.
- E.g:- Teacher, Student, Project.
- Attributes: Common properties of the entities in an entity sets. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity.
Attribute
-
Composite VS Simple Attributes
- Single valued VS Multivalued Attributes
- Stored VS Derived Attributes
- Complex Attributes
Relationship – specify the relations among entities from two or more entity sets
A relationship where two entities are participating is called a binary relationship. Cardinality is the number of instance of an entity from a relation that can be associated with the relation.
One-to-one
One-to-many
many-to-one
many-to-many
Keys
Key is an attribute or collection of attributes that uniquely identifies an entity among the entity set.
1. Super Key − A set of attributes (one or more) that collectively identifies an entity in an entity set.
2. Candidate Key − A minimal super key is called a candidate key. An entity set may have more than one candidate key.
3. Primary Key − A primary key is one of the candidate keys chosen by the database designer to uniquely identify the entity set.
- Represent the conceptual level of a database system
- Describe things and their relationships at a high level
- Entity set – an abstraction of similar things,
- E.g:- cars, students
- An entity set contains many entities
- Entities are represented by means of rectangles.
- Rectangles are named with the entity set they represent.
- E.g:- Teacher, Student, Project.
- Attributes: Common properties of the entities in an entity sets. Attributes are represented by means of ellipses. Every ellipse represents one attribute and is directly connected to its entity.
Attribute
- Composite VS Simple Attributes
- Single valued VS Multivalued Attributes
- Stored VS Derived Attributes
- Complex Attributes
Relationship – specify the relations among entities from two or more entity sets
One-to-one
One-to-many
many-to-one
many-to-many
Keys
Key is an attribute or collection of attributes that uniquely identifies an entity among the entity set.
1. Super Key − A set of attributes (one or more) that collectively identifies an entity in an entity set.
2. Candidate Key − A minimal super key is called a candidate key. An entity set may have more than one candidate key.
3. Primary Key − A primary key is one of the candidate keys chosen by the database designer to uniquely identify the entity set.
No comments:
Post a Comment