The Wayback Machine - https://web.archive.org/web/20240924142616/https://www.geeksforgeeks.org/attributes-to-relationships-in-er-model/
Open In App

Attributes to Relationships in ER Model

Last Updated : 19 Aug, 2019
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In ER model, entities have attributes which can be of various types like single-valued, multi-valued, composite, simple, stored, derived and complex. But relationships can also have attributes associated to them. Generally it is not recommended to give attributes to the relationships if not required because while converting the ER model into Relational model, things may get complex and we may require to create a separate table for representing the relationship. Let us see various cases and when we need to give attributes to the relationship with the help of examples:

1. One to one relationship:
In an organisation an employee manages a department and each department is managed by some employee. So, there is a total participation of em>Department entity and there is one to one relationship between the given entities. Now, if we want to store the Start_Date from which the employee started managing the department then we may think that we can give the Start_Date attribute to the relationship manages. But, in this case we may avoid it by associating the Start_Date attribute to either Employee or Department entity.


2. One to many relationship:
In an organisation many employees can work for a department but each employee can work for only a single department. So, there is a one to many relationship between the entities. Now if we want to store the Start_Date when employee started working for the department, then instead of assigning it to the relationship we should assign it to the Employee entity. Assigning it to the employee entity makes sense as each employee can work for only single department but on the other hand one department can have many employees working under it and hence, it wouldn’t make sense if we assign Start_Date attribute to Department.


3. Many to many relationship:
In an organisation an employee can work on many projects simultaneously and each project can have many employees working on it. Hence, it’s a many to many relationship. So here assigning the Number_of_Working_hours to the employee will not work as the question will be that it will store which project’s working hours because a single employee can work on multiple projects. Similar the case with the project entity. Hence, we are forced to assign the Number_of_Working_hours attribute to the relationship.


Conclusion: Give attributes to a relationship only in the case of many to many relationship.



Similar Reads

Data Objects, Attributes and Relationships in DBMS
Data Model is an abstract model that represents the data objects, data flow between these data objects, and the interrelationship between these data objects. It is a way of storing data on a computer so that it can be used in a more efficient manner for further purposes. Data model or data structure consists of following fundamental elements: 1. Da
3 min read
Relationships in ER model
Entity Relationship model (ER model) contains entities and relationships. ER model enables us to know how these entities are associated with each other. Entities interact with other entities through associations or relationships. Let us assume that Geeks is the name of a student, Placement 100 is the name of a course. For example, student Geeks enr
2 min read
Structural Constraints of Relationships in ER Model
Structural constraints, within the context of Entity-Relationship (ER) modeling, specify and determine how the entities take part in the relationships and this gives an outline of how the interactions between the entities can be designed in a database. There are two basic types of structural constraints: total participation, whereby all instances o
6 min read
Difference between identifying and non-identifying relationships
In this article, we will discuss the overview of an entity and identifying and non-identifying relationships and finally will focus on differences between both of them. Let's discuss it one by one. Overview : Entity types that do not have their own key attributes are known as the weak entity type. Unlike this, there are regular entity types that ha
7 min read
Recursive Relationships in ER diagrams
Prerequisite - ER Model A relationship between two entities of a similar entity type is called a recursive relationship. Here the same entity type participates more than once in a relationship type with a different role for each instance. In other words, a relationship has always been between occurrences in two different entities. However, the same
3 min read
Can Two Relationships be Related in an ER diagram?
Answer: Yes, two relationships in an ER diagram can be related through shared entities, linking tables, or generalization hierarchies.In traditional Entity-Relationship (ER) diagrams, relationships between entities are typically represented independently. However, interrelations between relationships can exist indirectly through shared entities, li
1 min read
Types of Attributes in ER Model
In a Database Management System (DBMS), an attribute is a property or characteristic of an entity that is used to describe an entity. Essentially, it is a column in a table that holds data values. An entity may contain any number of attributes. One of the attributes is considered as the primary key. In an Entity-Relation model, attributes are repre
5 min read
Difference between Bottom-Up Model and Top-Down Model
Top-Down Design Model: In the top-down model, an overview of the system is formulated without going into detail for any part of it. Each part of it then refined into more details, defining it in yet more details until the entire specification is detailed enough to validate the model. if we glance at a haul as a full, it's going to appear not possib
3 min read
Similarities between TCP/IP model and OSI model
Pre-Requisite: Layers of OSI Model, TCP/IP Model OSI Model or Open Systems Interconnection is an architecture of 7 layers in which each layer has its work to perform whereas TCP/IP is a concise version of the OSI Model. TCP/IP Model consists of 4 layers rather than the 7 layers of the OSI Model. There are so many similarities between the TCP/IP mod
5 min read
ACID Model vs BASE Model For Database
The difference between ACID and BASE database models is the way they deal with this limitation. The ACID model provides a consistent system.The BASE model provides high availability.To provide further insight, we will discuss each of the models separately in detail. ACID Model:Collections of operations that form a single logical unit of work are ca
5 min read
Difference between E-R Model and Relational Model in DBMS
In database management systems (DBMS), two key methods are the Relational model and the Entity-Relationship (E-R) model. Each has a specific function in the development and operation of databases. While the Relational model provides the practical structure for organizing and managing data in relational databases, the E-R model concentrates on offer
3 min read
Mapping from ER Model to Relational Model
To understand this, you should have an idea about: ER model Relation model After designing the ER diagram of system, we need to convert it to Relational models which can directly be implemented by any RDBMS like Oracle, MySQL etc. In this article we will discuss how to convert ER diagram to Relational Model for different scenarios. Case 1: Binary R
5 min read
This is exactly why we still use the OSI model when we have TCP/IP Model
What is the OSI Model?OSI is an acronym for Open Systems Interconnection. The International Organization for Standardization (ISO) created the OSI model (ISO). It's a model for how applications communicate over the internet. In order to facilitate interoperability between diverse devices and applications, the OSI model describes computing functions
10 min read
What is OSI Model? - Layers of OSI Model
OSI stands for Open Systems Interconnection , where open stands to say non-proprietary. It is a 7-layer architecture with each layer having specific functionality to perform. All these 7 layers work collaboratively to transmit the data from one person to another across the globe. The OSI reference model was developed by ISO - 'International Organiz
15+ min read
Difference between Relational model and Document Model
The relational model organizes data into tables with rows and columns, ideal for structured data. On the other hand, the document model stores data in hierarchical documents, which offers more flexibility for managing unstructured or semi-structured data. Both models serve different purposes in database management. What is the Relational Model?The
3 min read
Differences between Synthesized and Inherited Attributes
In Syntax Directed Definition, two attributes are used one is Synthesized attribute and another is inherited attribute. An attribute is said to be Synthesized attribute if its parse tree node value is determined by the attribute value at child nodes whereas An attribute is said to be Inherited attribute if its parse tree node value is determined by
2 min read
Data Mining: Data Attributes and Quality
Prerequisite - Data Mining Data: It is how the data objects and their attributes are stored. An attribute is an object's property or characteristics. For example. A person's hair colour, air humidity etc.An attribute set defines an object. The object is also referred to as a record of the instances or entity. Different types of attributes or data t
4 min read
Attributes of Data Warehouse
A data warehouse is meant for only query and analysis rather than transaction processing. The data warehouse is essentially subject-oriented, non-volatile, integrated, time-variant, and consists of historical data stored over long periods of time. A blueprint of BI and data mining algorithms. Data marts :Data marts are subsidiary data warehouses an
3 min read
How do you find non prime attributes?
Answer: Non-prime attributes in DBMS are those that are not part of candidate keys or the primary key.Identify Prime AttributesBegin by recognizing prime attributes, which are components of candidate keys or the primary key, playing a crucial role in uniquely identifying records. Understand Functional DependenciesAnalyze functional dependencies to
1 min read
How to Find Prime Attributes in DBMS?
Answer: Prime attributes in DBMS are identified through primary key components and functional dependencies.Understand Attribute DependencyIdentify the functional dependencies between attributes, understanding how changes in one attribute affect others. Primary Key IdentificationLook for attributes that form part of the primary key. Attributes in th
1 min read
How To Identify Key Attributes in DBMS?
Answer: Identify key attributes in DBMS through primary keys, functional dependencies, uniqueness requirements, and candidate keys. Understand Entity Relationships: Identify the entities and their relationships within the database schema, as key attributes are crucial in defining these relationships.Functional Dependency Analysis: Analyze functiona
1 min read
Attributes in DBMS
Attributes are properties or characteristics of an entity. Attributes are used to describe the entity. The attribute is nothing but a piece of data that gives more information about the entity. Attributes are used to distinguish one entity from the other entity. Attributes help to categorize the entity and the entity can be easily retrieved and man
6 min read
Multivalued Attributes in DBMS
Attributes are significant in DBMS as it deals with the organization and formatting of data. Of all the attributes, multivalued attributes are somewhat different and they have to be understood properly. To help us understand the above idea in the subsequent sections of this article, we will also explain related key terminologies, and how multivalue
6 min read
Two State Process Model in Operating System
Pre-requisite: States of a Process in Operating Systems The process in an operating system passes from different states starting from its formation to its completion. A process consists of program data and its associated data and a process control block (PCB). A process may change its state because of the following events like I/O requests, interru
3 min read
Building blocks of a Data Model
A data model is a structure of the data that contains all the required details of the data like the name of the data, size of the data, relationship with other data and constraints that are applied on the data. It is a communication tool. A data model is essential in order to store the database in a sorted manner. It will provide the interaction be
2 min read
Difference between ER Model and RDBMS
1. ER (Entity- Relationship) Model : ER model stands for entity relationship model. It specifies the structure of a database by giving the relationship between the entities of the system. An entity set is a group of entities that are similar to each other. It is considered as a conceptual design which can further be used to implement a database. It
2 min read
Data Model In Neo4j
The data model in Neo4j organizes data using the concepts of nodes and relationships. Both nodes and relationships can have properties, which store the data items associated with nodes and relationships. Nodes can have labels: A node can have zero, one, or several labels.The nodes that have the same label are grouped into a collection that identifi
3 min read
Record-Based Data Model
Data Model is the model that organizes elements of the data and tell how they relate to one-another and with the properties of real-world entities. The basic purpose of the data model is to make sure that the data stored in the data model is understood fully. Further, it has three types- 1. Physical Data Model, 2. Record-Based Data Model, 3. Object
2 min read
Model Planning for Data Analytics
In this article, we are going to discuss model planning for data analytics in which we will cover all procedural steps one by one. Model planning is phase 3 of lifecycle phases of data analytics, where team determines methods, techniques, and workflow it intends to follow for subsequent model building phase. During this phase that team refers to hy
3 min read
Key-Value Data Model in NoSQL
A key-value data model or database is also referred to as a key-value store. It is a non-relational type of database. In this, an associative array is used as a basic database in which an individual key is linked with just one value in a collection. For the values, keys are special identifiers. Any kind of entity can be valued. The collection of ke
3 min read
Article Tags :