Thursday, June 10, 2010

Understanding the ER diagram

ER diagram is represents real world situations using concepts, which are commonly used by people. It allows defining a representation of the real world at logical level. Er diagram has no facilities to describe machine-related aspects.
ER model the logical structure of data is captured by indicating the grouping of data into entities. Data can also be associated with relationships between entities. The er diagram also supports a
Top-down approach. By which details can be given in successive stages. The ER diagram has proved to be an excellent tool for representing the application and is the basis for the design of a database by the database administrator.

The following figure shows the ER Diagram.

NOTE- The contains three entities: course, Book and Publisher and two relationship text form course to book is one to many and pub-by relationship form book to publisher is one to one.

There are three basic elements in ER models:

Entities: - Entities are the "things" about which we seek information.

Attributes: - Attributes are the data we collect about the entities.
Relationships: - Relationships provide the structure needed to draw information from multiple entities.

How many type of relationship.
Three type of relationship.
i. One to one: one entity in A may be associated at most with one entity in B. It consists of a one and only one notation on one side of a relationship and a zero or one on the other.
ii. One to many: One entry in A may be associated with zero or more entities in B and one entity in B can be associated with at most one entity from A.

iii. Many to many: Where an instance in A is associated with many entities in B and vice-versa.

No comments:

Recent Posts