A database model that describes the attributes of entities and the relationships among them. An entity is a file (table). Today, ER models are often created graphically, and software converts the graphical representations of the tables into the SQL code required to create the data structures in the database. See data model and dimensional modeling.
Building an Entity Relationship Model
The Erwin modeling program from Computer Associates stands for Entity Relationship for Windows. In this order processing example, the tables for customers and orders are drawn graphically, and Erwin turns the graph into the appropriate SQL code for the target database. (Example courtesy of Computer Associates International, Inc.)
Also called an entity-relationship (ER) diagram, a graphical representation of entities and their relationships to each other, typically used in computing in regard to the organization of data within databases or information systems. An entity is a piece of data-an objector concept about which data is stored. A relationship is how the data is shared between entities. There are three types of relationships between entities:
one-to-one: one instance of an entity (A) is associated with one other instance of another entity (B). For example, in a database of employees, each employee name (A) is associated with only one social security number (B).
one-to-many: one instance of an entity (A) is associated with zero, one or many instances of another entity (B), but for one instance of entity B there is only one instance of entity A. For example, for a company with all employees working in one building, the building name (A) is associated with many different employees (B), but those employees all share the same singular association with entity A.
many-to-many: one instance of an entity (A) is associated with one, zero or many instances of another entity (B), and one instance of entity B ...