Entity-relationship diagrams (or ERD) are used to illustrate the logical structure of a database system. An ERD is a graphical representation of the entities within the database system that is being developed for a client and shows how individual entities are related to other entities in the system.
The benefits of using an ERD to represent the structure of the database system include the following.
The cardinality of a relationship specifies the number of entity occurrences that take part in a particular relationship. Relationship cardinality can be:
It is important to note that a many-to-many relationship cannot be implemented in a database system. The solution to this problem is to introduce a linking entity.
In this analyst and project example, the many-to-many relationship between analyst and project must be resolved by introducing a third entity assignment.
The resolves the many-to-many relationship with two one-to-many relationships. The assignment entity will record which analysts are allocated to which projects. It may only contain a compound key of both analystID and projectID.