I was asked to draw the ERD and relational diagram of a table, I previously assumed that the relational diagram was the same as a ERD so what is the difference?
An entity relationship diagram (ERD) is a visual form of relational databases. People use ERDs to model and design relational databases. The following is an ERD that depicts the tables for a simple school system. School and Student are entities (note: In ERD, the term "entity" is often used instead of "table".
An entity relationship diagram (ERD), also known as an entity relationship model, is a graphical representation that depicts relationships among people, objects, places, concepts or events within an information technology (IT) system.
A class diagram is a UML type static structure diagram that describes the structure of a system by showing the system's classes, their attributes and relationships among objects while ERD is a visual representation of data based on the ER model that describes how entities are related to each other in the database.
"Entity" is a real world concept, such as "a person" in your example. "Relation" is a set of tuples (records), each representing a model of an entity. In your example each tuple represents attributes of a single person, and their collection is a relation.
An Entity Relationship Diagram defines the relationship between entities and their attributes. In example, an ERD contains many-to-many relationships and do not include foreign keys. They are implied. In an ERD, we are simply visualising the entities, their attributes, and the relation between them. we dont care about where foreign keys go or how to implement that many-to-many relationship. (but we do underline primary keys!)
In a Relational Model we are referring to an implementation of our model. At this point we should be clear about the formats of our attributes, the foreign keys we use, and the linking tables we might need to stitch entities together. A relational model is basically a model of a possible database implementation.
In short, an ERD is an abstract concept of our database, it speaks in entities and attributes, an entity model. A relational model defines formats and relations in a way a database could understand, a data model.
ERD is belongs to relationship between entities, it is different from relation model.
Relational Database: A database that maintains a set of separate, related files (tables), but combines data elements from the files for queries and reports when required.
Relational model concepts are as follows:
image source from wiki
ERD: A database model that describes the attributes of entities and relationship occurs between two or more entities.
image source from oracle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With