Each entity must have a unique identifier, called a key attribute. The key attribute must be unique for the life of the entity and must be original for each instance. Key attributes are shown in ERD by underlining the name of the appropriate attribute. When an identifier is made up of two or more attributes it is called a composite key. Relationships A relationship in an ERD describes the associations between entities that are of interest to the organisation and users.
Lines connect the diamond to the related entities.
In Figure 1 there are two relationships, 'admits' and 'treats'. The number of entities in a relationship identifies the 'degree' of a relationship. The degree of a relationship can be unary, binary or ternary. A binary relationship describes a relationship that exists between two entities. Binary relationships are the type most frequently found in ERDs.