HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How do you read a one-to-many relationship in both directions?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
howyoureadbothonemanydirectionsrelationship

Problem

I'm having issues with reading this relationship.

Let's take the Professor and Class entities in this example. If I read this from Professor to Class, I would say, "A Professor teaches one to many Classes". If I go the opposite direction, from Class to Professor, I would initially read this as "A Class can be taught by one and only one Professor".

Is this the correct way to describe those relationships in both directions? Or, rather, is the direction from Class to Professor a "many to one" relationship?

I think I may be mixing up two different things (cardinality and relationships), but I'm not entirely sure.

Source

This screenshot was taken from California State University, Bakersfield's ERD PowerPoint

Solution

There are a lot of different graphical conventions for relationships in a data model. See some examples in Wikipedia: Cardinalities.

The vastly most common way to represent cardinality in a diagram is to have the symbol beside an entity type represent the cardinality in the direction of that entity type. In other words, the symbol meaning many is at the many end of the relationship.

Specifically in your example: Each PROFESSOR teaches one or more CLASSES and each CLASS is taught by exactly one PROFESSOR.

Very rarely I've seen people do this backwards (e.g. (min, max)-notation), but if you do that you're going to confuse most people.

Context

StackExchange Database Administrators Q#221631, answer score: 3

Revisions (0)

No revisions yet.