The Entity-Relationship Data Model

The Entity-Relationship Data Model

The procedure to design a database starts with an analysis of what information the database must hold and what are the relationships among elements of that information. Often, the structure of the database, called the database schema, is specified in one of several languages or notations appropriate for expressing designs. After proper consideration, the design is committed to a form in which it can be input to a DBMS, and the database takes on physical existence.

In this blog, we shall use a number of design notations. We begin in this section with a traditional and popular approach called the "entity-relationship" (E/R) model. This model is graphical in nature, with boxes and arrows representing the necessary data elements and their connections.

In "The Relational Data Model" we turn our attention to the relational model, where the world is represented by a collection of tables. The relational model is restricted to some extent, in the structures it can represent. Though, the model is very simple and useful, and it is the model on which the main commercial DBMS's depend today. Often, database designers start by developing a schema using the E/R or an object-based model, then translate the schema to the relational model for execution.

Other models are covered in "Other Data Models". In "Introduction to ODL", we shall introduce ODL (Object Definition Language), the standard for object-oriented databases. Next, we see how object-oriented ideas have affected relational DBMS's, yielding a model often called "object-relational".

"Semistructured Data" introduces another modeling approach, called "semistructured data". This model has an extraordinary amount of flexibility in the structures that the data may form. We also discuss, in "XML and Its Data Model", the XML standard for modeling data as a hierarchically structured document, using "tags" (like HTML tags) to indicate the role played by text elements. XML is an important embodiment of the semistructured data model.

the entity-relationship data model

The above figure gives an idea how the E/R model is used in database design. We begin with ideas about the information we want to model and render them in the E/R model. The abstract E/R design is then converted to a diagram in the data-specification language of some DBMS. Most commonly, this DBMS uses the relational model. If so, then by a moderately mechanical procedure that we shall cover in "From E/R Diagrams to Relational Designs", the abstract design is converted to a solid, relational design, called a "relational database schema".

It is to be noted that, while DBMS's sometimes use a model other than relational or object-relational, there are no DBMS's that use the E/R model directly. The reason is that this model is not adequately good match for the efficient data structures that must underlie the database.




Tags