Entity-Relationship (ER) Model | Database Modeling

967 viewsWeb Design

Entity-Relationship (ER) Model | Database Modeling

Introduction

We’ve got data that describes us, animals, objects, ideas, bank accounts, relationships between these objects— everything. As human beings we strive to organize this data with purpose of resolving problems. Before we can even begin to resolve problems using the data we’ve got to understand how to effectively conceptualize it.

One of the fundamental questions in Computer Science is how to organize data. The Entity-Relationship model tries to answer that. It can be used to assist with organizing data within a database.

What is the Entity-Relationship (ER) Model?

The Entity-Relationship (ER) is a way of describing data, and how different types of data may relate to one another. It allows individuals to to quickly understand what a specific object is made of, and how a singular object relates to other objects in its mini-world. There is an entire visual schema dedicated to describing entities.

ER Diagram Symbols

At the center of the ER model is an entity. An entity is a singular object, or a thing with an independent existence. An entity may be a physical object, or a concept. Each entity is made up of attributes that describe the entity. Attributes are properties of an entity. There are several different types of attributes. All attributes are either composite, or atomic (made up of many, or a singular). They are either stored, or derived. Attributes may also be single-valued or multi-valued.

The entity is labeled as a rectangle, and an attribute is an oval. (The colors are irrelevant, but are used to be visually appealing.)

A stored attribute is just that. An attribute that is stored for what it is. Derived attributes are a logical extension of a stored attribute. An example of such is a person’s age being derived from their date of birth.

Composite attributes are attributes that are made up of many attributes (two or more), whereas atomic attributes are indivisible. Atomic attributes are singular.

Single-valued attributes are attributes that have a single value. Multi-valued attributes may have one or more values. An example of such is college degrees. An individual may have one, or many degrees.

An Entity and its Attributes

We’ve described what an entity is, and how it is made up of attributes. Attributes are either: atomic or composite; stored or derived; single-valued or multi-valued. By understanding this vocabulary, and the symbols that describe them, we can quickly communicate with one another about our data models. This is the beginning of a very important concept that will enable us to quickly understand a mini-world, and enable us to build complex processes and systems around these data models.

Credits: medium.com

Nimesh Asked question October 14, 2022
1