ERD Terminologies are the terms such as entity , attributes their types and Keys that are responsible to create relationships between entities. Database Management Systems have been playing an important roles in our lives for decades now . It is helping businesses to grow and store their data, which later on used by Data Analysts to analyse different aspects of businesses.
Social Media apps connecting us with our friends no matter where they are, e-commerce have literally changed the face of shopping as we knew it. How did this happen? Well, go no further, you have the answer here. Yes our very own DBMS. All these and many others areas of human life which are facing digitisation have a fundamental support of a strong DBMS . Let’s discuss ERD terminologies that you’ll read often on my blog.
Before jumping towards ER diagram for university management system and create a data model diagram example by creating schema and following design practices and the high technical stuff , I need you to go through these first and then you can develop a better understanding of above articles.
Let’s go through each of the major ERD terminologies that we will come across while creating an ER Diagram.
An entity is representation of a real-life object that can be living one or non-living . We convert these objects and treat them as entities in DBMS as they are the key players .
Still ,confused ? Let me put it another way. You know Nouns ? well congratulations you know what an entity is. Oh Yes , this is it. Pick the nouns from your surrounding and you have an entity with you!
Examples could be if you’re designing a DBMS for your university. Teacher , Courses , Students , Admin Staff are entities.
We further classify them as of two types :
Strong Entity :
An entity that is not dependant on any other entity and can be identified on its own and by its own members . For example : Restaurant is a strong entity.
Weak Entity :
An entity that is dependant on other entities and need references from them to be identified . Taking above example , Bill is a weak entity as it’s existence and identification depends on the restaurant . Two rectangles are use to represent it.
While designing DBMS , rectangle represents an entity and always written in Uppercase.
Associative Entity :
Entity which is created to resolve many-to-many relationships also known as junction entity/table . This is discussed in detail in Best Practices For ERD .
Attributes are what we call properties of entities. Sometimes they are also called members. For Example . If Student is an entity then it must have some properties as well , such as name , age , gender , address and many more.
We further classify them in some types too .
Simple Attribute :
Attributes that cannot be divided or split further into more attributes. Like a phone number or gender . An oval shape symbol is used for representation
Composite Attribute :
Attributes that can be divided or split further into more attributes . Like Student name can be further divided into First Name , Middle Name and Last Name. Multiple oval shape symbols connected to an oval shape. Representation of Composite attribute
Key Attribute :
Attribute that is used in DBMS as a reference/identification attribute for the entity is a Key Attribute. Roll No of a Student is a Key Attribute here. Same oval shape with an underline representation
Derived Attribute :
Attribute that doesn’t exist physically in database , but we drive it on the base of another attribute. Age can be derived from date of birth . Dotted oval shape for representation
Multi-Valued Attribute :
Attribute that may or may not have more than value for an entity . Address of a student can be more than one. One for his home and one for his hostel. Double oval shape represents multi-value attribute.
Every entity is identified by an attribute that is acts as a reference for it’s representation. We mainly have two types of key-attributes :
Primary Key :
Attribute which is unique and does not have a repeating values. Example could be : Your Roll No or Student ID , no other student can have yours. Hence , we can use Roll No or Student ID to identify one particular student everywhere.
Foreign Key :
Attribute which receives a reference from another entity . If we pass Student’s Roll No or Student ID to University entity . Roll No or Student ID will be a foreign key in University for Student.
Foreign keys are helpful when we want to join tables and create relationships between tables.
With this approach database designers translates all business approaches into entities and attributes. After this they join entities with each and establish relationships between them .
Professional Data Analyst and Business Intelligence Developer with experience of delivering industrial projects for Supply Chain and Insurance Industry . Sharing all my experience and insights in databases and data warehousing and open to learn from fellows !
Happy Reading and Learning!