ER Modeling Basics
Introduces the core parts of an entity-relationship model and how an ERD helps clarify data requirements before implementation.
The Building Blocks of an ER Model
From entity types to instances
An entity is a kind of thing a system needs to record, such as Student or Course. An individual student is an instance of the Student entity type. Keeping these ideas distinct helps separate the category being modeled from the particular records that belong to it.
An entity’s attributes describe its properties. For example, StudentName could describe a student, while CourseTitle could describe a course. Each attribute should have a clear meaning and an appropriate value type, so the model makes clear what information is being recorded.
Identifying records and modeling the design
A key is an attribute, or a set of attributes, that uniquely identifies an entity instance. A candidate key is one that could uniquely identify records; one candidate key is selected as the primary key. In practice, the key lets the system distinguish one instance from another, even when other attributes may be shared.
An entity-relationship diagram (ERD) brings these building blocks together visually: it presents the information the system needs and the associations among it. For example, an ERD can show that a student enrolls in a course. Reviewing the entities, their attributes, and their associations in one model helps people check requirements before implementation. The model can then be translated into relational tables, columns, keys, and constraints.