

This diagram says that there is a one-to-one relationship between a person and their fingerprints. An optional side is denoted with an open circle. This diagram shows that it’s mandatory for a capital to have a country and it’s mandatory for a country to have a capital.Īnother possibility is for one or both of the sides of the relationship to be optional. The perpendicular straight lines mean “ mandatory”. The one-to-one relationship between country and capital can be denoted like this: (The “many” cardinality is denoted with a crow’s foot symbol. The “one” cardinality is denoted with a single straight line. Employee - manager: Each employee has exactly one immediate supervisor or manager, but each manager usually supervises many employees.ĭenoting a One-to-One Relationship in an ER DiagramĪ one-to-one relationship in an ER diagram is denoted, like all relationships, with a line connecting the two entities.Parent - child: Each child has two parents, but each parent can have many children.Country - city: Each city is in exactly one country, but most countries have many cities.

One set of user settings is associated with exactly one user.įor clarity, let’s contrast these examples with relationships that are not one-to-one: Spouse - spouse: In a monogamous marriage, each person has exactly one spouse.For many websites, one email address is associated with exactly one user account and each user account is identified by its email address. Each set of fingerprints identifies exactly one person. Each person has a unique set of fingerprints.

Each capital city is the capital of exactly one country.
