E-R Model and Relational Model both are the types of Data Model. Data Model describes a way to design database at physical, logical and view level. The main difference between E-R Model and Relational Model is that E-R Model is entity specific, and Relational Model is table specific.
Let us discuss some differences between E-R Model and Relation model with the help of comparison chart shown below.
Content: E-R Model Vs Relational Model
Comparison Chart
Basis for Comparison | E-R Model | Relational Model |
---|---|---|
Basic | It represents the collection of objects called entities and relation between those entities. | It represents the collection of Tables and the relation between those tables. |
Describe | Entity Relationship Model describe data as Entity set, Relationship set and Attribute. | Relational Model describes data in a table as Domain, Attributes, Tuples. |
Relationship | E-R Model is easier to understand the relationship between entities. | Comparatively, it is less easy to derive a relation between tables in Relational Model. |
Mapping | E-R Model describes Mapping Cardinalities. | Relational Model does not describe mapping cardinalities. |
Definition of E-R Model
Entity-Relationship Model or E-R Model was developed by Peter Chen in 1976. E-R Model can be expressed as the collection of entities, also called as real word objects and relations between those entities. No two entities should be identical. E-R Model shows the conceptual view of the database.
E-R Model is formed by the entity set, relationship set and the attributes. Where all the entities collectively form entity set, all the relations between the entities collectively form relationship set, and the attribute describes the properties of entities.
It can be explained with an example. Let us take two real-world entities Employ and Department it will form an Entity set. Now we can easily easy derive a relation between these two entities that an Employ works-for a Department. This is how we can retrieve relationship set from E-R Model.
On the other hand, attributes of these entities would be, for Employ- (employ_name-, employ_id, emploly_add, employ_post, etc.) and for Department- (department_name, department_no, location, etc.).
The content of ER-model must conform constraints like Mapping cardinality, Participation ratio and Keys. Mapping cardinality describes the number of entities associated to the another entity. Participation ratio describes whether there is a total or partial participation of one entity to another. Keys uniquely define an entity in an entity set.
Definition of Relational Model
Relational Model was developed by Codd in 1970 along with the non-procedural method to query the data from Relational Model. Relational Model represents data and relation among those data in the form of tables. Tables are called as relations in Relational Model.
Tables can have any number of rows but have a definite number of columns. Each row in a table is called Tuple that contains the full information about a particular entity in a table. Set of Tuples is called record and hence, the Relational model is called Record-based Model.
The columns in a table are called attributes that describe the properties of a table (relation). Each attribute must have a domain that defines the type of value that it can store. Like E-R Model Keys also plays an important role in a Relational Model as a key uniquely identify a tuple in a relation or table.
Key Differences Between E-R Model and Relational Model
- The basic difference between E-R Model and Relational Model is that E-R model specifically deals with entities and their relations. On the other hand, the Relational Model deals with Tables and relation between the data of those tables.
- An E-R Model describes the data with entity set, relationship set and attributes. However, the Relational model describes the data with the tuples, attributes and domain of the attribute.
- One can easily understand the relationship among the data in E-R Model as compared to Relational Model.
- E-R Model has Mapping Cardinality as a constraint whereas Relational Model does not have such constraint.
Conclusion
If E-R Model is to be converted to the Relational model each strong entity would define a separate table.
Arouna says
Nice I love this web site👍👍