Database – is a large data repository that stores a shared collection of logically data.
A database can be modeled as: A collection of entities and relationship among entities.
What is Entity Relationship Diagram?
An entity-relationship (ER) diagram is a specialized graphic diagram that illustrates the relationships between entities in a database, simply it illustrates the logical structure of databases.
ER diagrams often use symbols to represent different types of information.
Rectangles represent entity.
Diamonds represent relationship.
Lines link attributes to entity and entity to relationship.
Ellipses represent attributes
Double ellipses represent multivalued attributes.
Dashed ellipses denote derived attributes.
Underline indicates primary key attributes
An entity
Is an object that exists and is distinguishable from other objects
An entity is an object or concept about which you want to store information.
“An entity is a business object that represents a group, or category of data.”
Example: person, company, event, plant
An entity set is a set of entities of the same type that share the same properties.
Example: set of all persons, companies, trees, holidays
Weak Entity
A weak entity is an entity that must defined by a foreign key relationship with another entity as it cannot be uniquely identified by its own attributes alone.
An entity set that does not have a primary key is referred to as a weak entity set.
Entities have attributes
An attribute defines and builds an entity.
An attribute is a sub-group of information within an entity.
Example: people have names and addresses
Key attribute
A key attribute is the unique, distinguishing characteristic of the entity. For example, an employee's social security number might be the employee's key attribute.
Multivalued attribute
A multivalued attribute can have more than one value. For example, an employee entity can have multiple skill