Instances of an E/R Diagram

Instances of an E/R Diagram

E/R diagrams provide details for describing the schema of databases, that is, their structure. A database described by an E/R diagram will include specific data, which we call the database instance. Particularly, for each entity set, the database instance will have a particular finite set of entities. Each of these entities has specific values for each attribute. Keep in mind, this data is abstract only; we do not store E/R data directly in a database. Rather, imagining this data exists helps us to think about our design, before we convert to relations and the data adopts physical existence.

The database instance also contains particular choices for the relationships of the diagram. A relationship R that connects n entity sets E1, E2, . . . , En has an instance that consists of a finite set of lists (e1, e2, . . . , en), where each ei is chosen from the entities that are in the current instance of entity set Ei. We consider each of these lists of n entities as "connected" by relationship R.

This set of lists is called the relationship set for the current instance of R. It is often helpful to imagine a relationship set as a table. The columns of the table are headed by the names of the entity sets involved in the relationship, and each list of connected entities occupies one row of the table.

Example : An example of the Stars-in relationship could be visualized as a table with pairs such as:

instances of an er diagram

The members of the relationship set are the rows of the table. For instance,

                                             (Basic Instinct, Sharon Stone)

is a tuple in the relationship set for the current instance of relationship Stars-in.