Compare the Difference Between Similar Terms

Difference Between

Home / Technology / IT / Programming / Difference Between ER Diagram and Class Diagram

Difference Between ER Diagram and Class Diagram

June 1, 2011 Posted by Indika

ER Diagram vs Class Diagram

ER (entity-relationship) diagrams and Class diagrams are two of the design diagrams that the software developers create usually during the design phases of the software engineering life cycle. ER diagrams are a product of entity-relationship modeling (ERM) technique for modeling databases. A class diagram, written in Unified Modeling Language, is a diagram that describes the structure of a proposed system. Although there is no requirement to have an exact one to one mapping between the classes in class diagrams and entities in entity diagrams, generally there is some meaningful relationship between them. However, there are plenty of occasions where an entity of an ER diagram maps to multiple classes of the corresponding class diagram or a single class of a class diagram mapping to multiple entities of the corresponding ER diagram. But, this depends entirely on the design choices of the software developers.

What is ER Diagram?

ER diagrams are the product of entity-relationship modeling. Entity-relationship modeling is the process of coming up with an abstract and conceptual representation of data. ER diagrams ultimately model the databases. More specifically, it produces the conceptual schema of the data model. Main building blocks of ER diagrams are entities, relationships and attributes. An entity represents a thing that can exist independently and that can be defined uniquely. Most often, an entity represents a real world object such as a car or an employee. Entities can be though of as nouns that come up during the description of the problem to be solved. Relationship shows how entities are connected. They are like verbs found in the description of the problem to be solved. Properties of both entities and attributes are called attributes.

What is Class Diagram?

A class diagram (more correctly known as a UML class diagram) is a design diagram that represents the static structure and the behavior of a proposed system, defined using UML (Unified Modeling Language). A class diagram shows the systems’ classes, relationships between classes, and their attributes. Classes depict the abstract representation of real world objects, while the relationships depict how each class is connected to others. Both classes and relationships have properties called attributes. Methods in the classes represent or define the behavior of these classes. Methods and attributes of classes are called the members of the class.

What is the difference between ER Diagram and Class Diagram?

Although ER diagrams and Class diagrams are two of the design diagrams developers often come across during the design phases of software engineering projects, they have their key differences. ER diagrams represent the abstract representation of the data model, while class diagrams represent the static structure and behavior of the proposed system. Main building blocks of ER diagrams are entities, relationships and attributes but the main building blocks of class diagrams are classes, relationships and attributes. Class diagram are more likely to map in to real-world objects, while ER diagrams most often map in to the tables in the database. Usually, relationships found in ER diagrams are more difficult to understand for humans than relationships in class diagrams.

Related posts:

Difference Between Microsoft .NET Framework 3.5 and .NET Framework 4.0 Difference Between Flowchart and Data Flow Diagram (DFD) Difference Between Linear and Nonlinear Data StructuresDifference Between Linear and Nonlinear Data Structures Difference Between ERD and DFD Difference Between Prolog and Lisp

Filed Under: Programming Tagged With: abstract representation of data model, class diagrams, Entity Relationship Diagram, entity-relationship modeling technique, ER diagram, ERM technique, software design diagrams, static structure of data model, UML class diagram, Unified Modeling Language

About the Author: Indika

Indika, BSc.Eng, MSECE Computer Engineering, PhD. Computer Science, is an Assistant Professor and has research interests in the areas of Bioinformatics, Computational Biology, and Biomedical Natural Language Processing.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Request Article

Featured Posts

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and Cold Symptoms

Difference Between Coronavirus and SARS

Difference Between Coronavirus and SARS

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Influenza

Difference Between Coronavirus and Covid 19

Difference Between Coronavirus and Covid 19

You May Like

Difference Between Samsung Galaxy S6 Edge and HTC One M9

Difference Between Samsung Galaxy S6 Edge and HTC One M9

Difference Between Saturated and Concentrated Solution

Difference Between Saturated and Concentrated Solution

Difference Between DNA and Protein Sequence

Difference Between DNA and Protein Sequence

What is the Difference Between Skinceuticals CE Ferulic and Phloretin CF

What is the Difference Between Skinceuticals CE Ferulic and Phloretin CF

What is the Difference Between Positive and Negative Selection of T Cells

What is the Difference Between Positive and Negative Selection of T Cells

Latest Posts

  • What is the Difference Between COPD and Lung Cancer
  • What is the Difference Between Silk and Cotton
  • What is the Difference Between Galactosemia and Lactose Intolerance
  • What is the Difference Between Glycosuria and Glucosuria
  • What is the Difference Between Menkes and Wilson’s Disease
  • What is the Difference Between Xerophthalmia and Keratomalacia
  • Home
  • Vacancies
  • About
  • Request Article
  • Contact Us

Copyright © 2010-2018 Difference Between. All rights reserved. Terms of Use and Privacy Policy: Legal.