Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
• Attributes
Entity & Entity Sets
Entity
An entity is an object that exists and is
distinguishable from other objects.
An entity may be concrete (a person or a
book, for example) Or abstract (like a
holiday, a concept, an idea or convenience).
Example:
John with NO. 001-111-10001 is an entity, as
he can be uniquely identified as one
particular person in the universe.
Entity & Entity Sets
Entity Sets
An entity set is a set of entities of the same
type (e.g., all persons having an account at
a bank).
Example:
Relation Ship
A relationship captures how two or more
entities are related to one another
A data relationship is a natural association
that exists between one or more entities
Example:
One person (P1,P2,P3,P4) can sit on only
one chair at any point of time.
Relationship & Relationship Sets
Example:
A person can sit on several chairs at different
point of time.
Relationship & Relationship Sets
Type of Relationship
1.One to One
Example:
One person (P1,P2,P3,P4) can sit on only one chair at any point of time.
And also one chair (C1,C2,C3,C4) can accommodate a maximum of one
person at any given time.
Type of Relationship
2.One to Many
Example:
One organization(O1,O2,O3) can have many employees but one
employee (E1,E2,E3,E4,E5) can work only for one organization.
Type of Relationship
3.Many to One
Example:
Many employees (E1,E2,E3…) can work for
only one department but one department (D1,D2,D3) can have many
employees.
Type of Relationship
4.Many to Many
Example:
One student (S1,S2,S3,S4) is enrolled for many courses (C1,C2,C3,C4)
and one course is enrolled by many students
Attributes
Attributes
Each entity instance in an entity set is described
by a set of attributes that describe their qualities,
characteristics or properties that are relevant and
the values of the attributes.
Example
Sample ERD
Thank You