The ER (Entity-Relationship) model is a conceptual data model used in database design. It represents the data in terms of entities, attributes, and relationships. Here are the basic concepts of the ER model:
Entity: An entity is a real-world object, concept or thing with an independent existence that can be easily distinguished from other objects. In a database, an entity is represented as a table, and each row in the table represents an instance of the entity.
Attribute: An attribute is a characteristic or property of an entity that describes it. For example, in an entity called “Customer”, “Name”, “Address”, and “Phone Number” could be attributes. In a database, attributes are represented as columns in a table.
There are many different types of attributes defined in the ER database model, some of which are listed below:
Simple attributes are those that have values that are atomic and cannot be further subdivided. age of the student, for instance.
A composite attribute is one that combines more than one simple attribute. For instance, the address of a student will include the house number, street name, pin code, etc.
Derived attributes are those that aren’t actually part of the overall database management system but are instead created by using other attributes. for instance, the typical age of a class.
Single-valuedattribute: They have a single value, as their name would imply.
Multi-valued attribute: And, they can have multiple values.
Relationship: A relationship is an association between two or more entities. It represents how the entities are connected to each other. In a database, relationships are represented as links between tables. The number of participating entities in a relationship defines the degree of the relationship.
Binary = degree 2
Ternary = degree 3
n-ary = degree
Cardinality: Cardinality refers to the number of occurrences of one entity that can be associated with the number of occurrences of another entity in a relationship. There are three types of cardinalities: one-to-one, one-to-many, and many-to-many.
Primary Key: A primary key is a unique identifier for a record in a table. It is used to ensure that each record in the table is uniquely identified and can be easily accessed. In the ER model, a primary key is represented as an attribute of the entity.
Foreign Key: A foreign key is a field or combination of fields in a table that refers to the primary key of another table. It is used to establish a relationship between two tables.
The ER model provides a visual representation of the database and helps to ensure data integrity by defining the relationships between entities. It is a widely used model in database design due to its flexibility, scalability, and ease of use.
Staying up to the mark is what defines me. Hi all! I’m Rabecca Fatima a keen learner, great enthusiast, ready to take new challenges as stepping stones towards flying colors.