What is the Entity-Relationship Model? - Diagram & Examples

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Quantitative Analysis for Business Decisions

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
 Replay
Your next lesson will play in 10 seconds
  • 0:03 The ER Diagram
  • 1:17 Entities and Tables
  • 1:59 Keys
  • 3:17 Cardinality
  • 4:50 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Timeline
Autoplay
Autoplay
Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Instructor: Ronald Price

Ron has held a variety of positions in higher ed and business, including 25+ years as an instructor and 20+ years as a corporate senior manager, and consultant.

In this lesson, we look at a conceptual design tool commonly used in the planning and layout of a database: the entity-relationship (ER) model. An ER model is typically presented as a diagram (ERD). We look at how it's created and what it represents.

The ER Diagram

An ER model (ERM) is the conceptual design of a database that includes its entities and relationships. An ER model is essentially the same thing as an ER diagram (ERD), which is a visual representation of the ERM. ERDs can be developed at three separate levels of a design process.

First is conceptual design, which defines the scope of a project and identifies the data entities, and it's a first pass at the relationships to be included in the database. The conceptual ERD provides the foundation for the logical design phase of a project.

Second is logical design. More detailed than a conceptual ERD, a logical ERD includes more information about the data entities and their relationships. However, a logical design ERD is independent of any technology on which its design could be implemented.

Last is physical design, which depicts the elements and characteristics of a database relative to the technology on which it is to be implemented. This typically includes the specification of entity keys, attribute characteristics, and finite relationship and foreign key definitions.

Entities and Tables

In an ERD, entities are represented as tables that typically include only the attribute names at the conceptual level. In this ERD, for example, each entity - such as students, classes, buildings, and books - is defined as a table, and each entry - such as a student, a class, or a book - occupies a row in the table.

An entity definition in an ERD
A table definition in an ERD

Also, each of the attributes, or fields, of the entity creates a column in the table, and all of the rows have the same attributes. Another important term to cover here is instance, which is what each row of a table represents. For example, when a student's data is entered into the student table, an instance of the student table is created.

Keys

The term key in the context of a database refers to one or more attributes that provide each instance with a unique value that differentiates it from the other rows of the same table. A student's last name may not be unique among all students, whereas an individually assigned student ID number should be.

There are two types of keys that can be defined in a database: primary keys and foreign keys. A primary key (PK) uniquely identifies each row (instance) of a table. A PK should be unique and not duplicated. On the other hand, a foreign key (FK) is used to connect an instance in one table to a matching instance in another table. A value in Table A is used to link to an associated value in Table B. For example, students enroll in classes. In a database, the student ID number provides an FK link between the student table and the enrollment table. Using this FK, each course in which a student is enrolled can be retrieved.

In a logical level ERD, PKs and FKs are shown to define the relationships of the database entities. It is very important to the efficiency and utility of the database that these relationships be carefully defined and included in the ERD.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account
Support