Entity Relationship (ER) Diagram Model
Weak Entity
A __________ is a type of entity which doesn't have its key attribute. It can be identified uniquely by considering the primary key of another entity. For that, weak entity sets need to have participation.
Simple attribute
A type of attribute that can't be divided any further. For example, a student's contact number. It is also called an atomic value.
Composite attribute
A type of attribute where breaking down attributes is possible. For example, a student's full name may be further divided into first name, second name, and last name.
Entity set
An _______ is a group of similar kind of entities. It may contain entities with attribute sharing similar values. Entities are represented by their properties, which also called attributes. All attributes have their separate values. For example, a student entity may have a name, age, class, as attributes.
Relation
Association between the instances of one or more entity types
- Eliminate any redundant entities or relationships - You need to make sure that all your entities and relationships are properly labeled - There may be various valid approaches to an ER diagram. You need to make sure that the ER diagram supports all the data you need to store - You should assure that each entity only appears a single time in the ER diagram - Name every relationship, entity, and attribute are represented on your diagram - Never connect relationships to each other - You should use colors to highlight important portions of the ER diagram
Best Practices for Developing Effective ER Diagrams
Entity
Can be a person, place, object, event or concept about which data is to be maintained. The characteristics of _____ are must have an attribute, and a unique key. It is made up of some 'attributes' which represent that entity.
Cardinality
Defines the numerical attributes of the relationship between two entities or entity sets.
1. One-to-One Relationships 2. One-to-Many Relationships 3. May to One Relationships 4. Many-to-Many Relationships
Different types of cardinal relationships are: (4)
Peter Chen, 1971
ER diagrams are visual tools that are helpful to represent the ER model. ___________ proposed ER Diagram in _______ to create a uniform convention that can be used for relational databases and networks. He aimed to use an ER model as a conceptual modeling approach.
- rectangle - oval - diamond
Entity Relationship Diagram Symbols & Notations mainly contains three basic symbols which are ________, _________ and _______ to represent relationships between elements, entities and attributes.
- ER model allows you to draw Database Design - It is an easy to use graphical tool for modeling data - Widely used in Database Design - It is a GUI representation of the logical structure of a Database - It helps you to identifies the entities which exist in a system and the relationships between those entities
Facts about ER Diagram Model (5)
- Rectangles - Ellipses - Diamonds - Lines - Primary key - Double Ellipses
Give the main components and its symbols in ER Diagrams:
Many-to-One
More than one entity from entity set X can be associated with at most one entity of entity set Y. However, an entity from entity set Y may or may not be associated with more than one entity from entity set X.
Many-to-Many
One entity from X can be associated with more than one entity from Y and vice versa.
One-to-one
One entity from entity set X can be associated with at most one entity of entity set Y and vice versa.
One-to-many
One entity from entity set X can be associated with multiple entities of entity set Y, but an entity from entity set Y can be associated with at least one entity.
- Helps you to define terms related to entity relationship modeling - Provide a preview of how all your tables should connect, what fields are going to be on each table - Helps to describe entities, attributes, relationships - ER diagrams are translatable into relational tables which allows you to build databases quickly - ER diagrams can be used by database designers as a blueprint for implementing data in specific software applications - The database designer gains a better understanding of the information to be contained in the database with the help of ERP diagram - ERD Diagram allows you to communicate with the logical structure of the database to users
Prime reasons for using the ER Diagram (7)
Attribute
Property or characteristics of entity. It is a single-valued property of either an entity-type or a relationship-type.
Double Ellipses
Represent multi-valued attributes
Step 1) Entity Identification Step 2) Relationship Identification Step 3) Cardinality Identification Step 4) Identify Attributes Step 5) Create the ERD Diagram
Steps to Create an ER Diagram
Ellipses
Symbol represent attributes
Rectangles
This Entity Relationship Diagram symbol represents entity types
- Simple attribute - Composite attribute - Derived attribute - Multivalued attribute
Types of Attributes (4)
A real-world thing either living or non-living that is easily recognizable and nonrecognizable. It is anything in the enterprise that is to be represented in our database. It may be a physical thing or simply a fact about the enterprise or an event that happens in the real world.
WHAT IS ENTITY?
ER Diagram
________ stands for Entity Relationship Diagram, also known as ERD is a diagram that displays the relationship of entity sets stored in a database. In other words, _________ help to explain the logical structure of databases. _______ are created based on three basic concepts: entities, attributes and relationships. ___________ contain different symbols that use rectangles to represent entities, ovals to define attributes and diamond shapes to represent relationships.
ER Model
________ stands for Entity Relationship Model is a high-level conceptual data model diagram. _________ helps to systematically analyze data requirements to produce a well-designed database. The __________ represents real-world entities and the relationships between them. Creating an __________ in DBMS is considered as a best practice before implementing your database.
Relationship
____________ is nothing but an association among two or more entities.
Primary key
attributes are underlined
Lines
It links attributes to entity types and entity types with other relationship types
Diamonds
This symbol represents relationship types
Multivalued attribute
This type of attribute can have more than one values. For example, a student can have more than one mobile number, email address, etc.
Derived attribute
This type of attribute does not include in the physical database. However, their values are derived from other attributes present in the database. For example, age should not be stored directly. Instead, it should be derived from the DOB of that employee.
- Entities - Attributes - Relationships
Three Basic Components of the ER Diagram
