The document discusses the key concepts of an entity-relationship (E-R) diagram including entities, attributes, and their types. An entity is a piece of data like a student or teacher that is represented in a database. Entities can be strong or weak depending on whether they have a primary key to uniquely identify them. Attributes are the properties of entities like name or age. Attributes can be simple, composite, derived, single-valued, or multi-valued. The E-R diagram provides a graphical representation of how data is organized in a database by showing the relationships between entities and their attributes.
3. Objective
What is E-R Diagram?
What is entity?
Types of entities
What is Attributes?
Types Of Attributes
4. What is E-R Diagram?
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.
5. Entity
An entity can be a real-world object, either animate or inanimate, that
can be easily identifiable. For example, in a school database, students,
teachers, classes, and courses offered can be considered as entities. All
these entities have some attributes or properties that give them their
identity.
An entity set is a collection of similar types of entities. An entity set may
contain entities with attribute sharing similar values. For example, a
Students set may contain all the students of a school; likewise a Teachers
set may contain all the teachers of a school from all faculties. Entity sets
need not be disjoint.
7. Weak Entities
In a relational database, a weak entity is
an entity that cannot be uniquely
identified by its attributes alone;
therefore, it must use a foreign key in
conjunction with its attributes to create a
primary key. The foreign key is typically a
primary key of an entity it is related to.
Strong Entity
An entity set that has a primary key is
called as Strong entity
8. Associative Entities
Associative is a type of entity that associate the instances of one or many entity
type with one another. The Attributes associative represent the relationship
between the entity instances.
9. Attributes
Entities are represented by means of their properties, called attributes.
All attributes have values. For example, a student entity may have name,
class, and age as attributes.
There exists a domain or range of values that can be assigned to
attributes. For example, a student's name cannot be a numeric value. It
has to be alphabetic. A student's age cannot be negative, etc
11. Simple attribute
Simple attributes are atomic values, which cannot be divided
further. For example, a Person Can have Only One gender and
one date of birth.
12. Composite attribute −
Composite attributes are made of more than one simple attribute.
For example, a student's complete name may have first_name and
last_name.
13. Derived attribute −
Derived attributes are the attributes that do not exist in the physical
database, but their values are derived from other attributes present
in the database. For example, age Phone no in a department should
not be saved directly in the database, instead it can be derived. For
another example, age can be derived from data_of_birth.