Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between ER diagram and EER diagram

What is the difference between ERD (Entity relationship diagram) and EERD (enhanced entity relationship diagram)?

like image 719
shaki mandira Avatar asked Mar 28 '12 10:03

shaki mandira


People also ask

What is EER diagram?

Enhanced Entity-Relationship (EER) diagrams are an essential part of the modeling interface in MySQL Workbench. EER diagrams provide a visual representation of the relationships among the tables in your model. Revisions made with the Model Editor are shown in the associated diagram.

What is the difference between the ER model and the extended ER model?

Extended ER is a high-level data model that incorporates the extensions to the original ER model. Enhanced ER models are high level models that represent the requirements and complexities of complex databases.


2 Answers

Entity-Relationship model

You have relationships (image source)

example for an relationship

and attributes (image source)

example for an attribute

that can also be primary keys (image source)

example for an primary key

Enhanced entity–relationship model

You have the same as with the ER model plus

specialisation

enter image description here

partitioning (which are multiple specialisations)

generalisation

aggregation

keys are annotated differently:

enter image description here

like image 143
Martin Thoma Avatar answered Sep 30 '22 17:09

Martin Thoma


I would add that ER model is basic model which has all you need for relational algebra as it is (including ISA hierarchy - inharitence nad other stuff I don't remember). And is more abstract (so every box doesn't have to be database table and the other way around some boxes can be more then 1 table)

EER model is closer to what real database look like. So every box is actually table.

I assume the accepted answer is right too, but in my opinion (havent read this anywhere I just think it is this way) EER was created to help people design databases even more then the basic relational algebra. Relational algebra with ER gives u everything you need to model database but you need some compiler which will translate ISA hierarchies and relations into actual tables and with EER your getting what you see. I was using both to design tables - ER is more logical, because it abstracts you from stuff like inheritance since you just tell your ER tool I want this to inherit from that and you dont have to create 2 tables. But EER is better because you see what you get.

Conclusion: ER is basic principle, EER is little bit better tool for actual work with less abstraction.

(My teoretical knowladge of relational algebra is too rusty, so I hope I remember everything right, correct me if I am wrong)

like image 41
Srneczek Avatar answered Sep 30 '22 16:09

Srneczek