Crow's foot notation for one and many

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Crow's foot notation for one and many

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. In crow's foot notation, what does a single bar at the end of a relationship line mean?
A One
B Many
2. In crow's foot notation, what does the three-pronged symbol at the end of a line mean?
A One
B Many
3. A line has a bar at the CLASS end and a crow's foot at the STUDENT end. How should you read it aloud?
A One class has many students
B One student has many classes
4. Which end of a one-to-many line holds the foreign key?
A The single bar (one) end
B The crow's foot (many) end
5. A CUSTOMER has a single bar and an ORDER has a crow's foot. Which table contains the customerId foreign key?
A ORDER
B CUSTOMER

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1STUDENT ||---|< RESULT AOne PRODUCT can appear in many ORDERS.
2CLASS ||--o< STUDENT Bresults.studentId REFERENCES students(studentId)
3In a one-to-many relationship, the crow's foot end is the side that holds the foreign key. CA bar and circle at the CLASS end mean zero or one, not many. The line needs a crow's foot to show many classes.
4Reading an ERD aloud: start at one entity, follow the line, and say 'one' for a bar and 'many' for a crow's foot. DOne class can have zero or many students. The circle marks the many side as optional.
5STUDENT >|---|| RESULT (foreign key studentId placed in STUDENT) EThe crow's foot is drawn at STUDENT, which says many students per result. The foreign key also sits on the one side.
6TEACHER ||--o| CLASS (a teacher has many classes) FOne student can have many results, but each result belongs to exactly one student.

Definitions

crow's foot

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
# | means one, < means many Teacher _--< Class # One teacher has many classes
2.
# | means one, < means many Teacher |--_ Class # One teacher has many classes
3.
House |--< Student # The foreign key is in the _______ table
4.
# | means one, < means many House |--< Student # One House has ____ Students
5.
# | = mandatory, o = optional Teacher |--_< Class # A teacher may have zero classes

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A erDiagram
B TEACHER ||--o{ CLASS : runs
C CLASS ||--|| STUDENT : has
Question 2
A AUTHOR }o--|| BOOK : writes
B BOOK ||--o{ LOAN : has
C -- FK authorId is in BOOK
Question 3
A ERD: OWNER ||--o{ PET : has
B Read: one PET has many OWNERS
C FK ownerId goes in PET
Question 4
A erDiagram
B TEAM ||--o{ PLAYER : has
C PLAYER ||--o{ GOAL : scores
D %% FK teamId sits in TEAM
Question 5
A erDiagram
B FAN ||--o{ TICKET : buys
C %% A fan must have a ticket

Answer Key

Crow's foot notation for one and many
Section A: Quick Questions
Q1
A — One
Q2
B — Many
Q3
A — One class has many students
Q4
B — The crow's foot (many) end
Q5
A — ORDER
Section B: Match the Pairs
Q1
STUDENT ||---|< RESULT → One student can have many results, but each result belongs to exactly one student.
Q2
CLASS ||--o< STUDENT → One class can have zero or many students. The circle marks the many side as optional.
Q3
In a one-to-many relationship, the crow's foot end is the side that holds the foreign key. → results.studentId REFERENCES students(studentId)
Q4
Reading an ERD aloud: start at one entity, follow the line, and say 'one' for a bar and 'many' for a crow's foot. → One PRODUCT can appear in many ORDERS.
Q5
STUDENT >|---|| RESULT (foreign key studentId placed in STUDENT) → The crow's foot is drawn at STUDENT, which says many students per result. The foreign key also sits on the one side.
Q6
TEACHER ||--o| CLASS (a teacher has many classes) → A bar and circle at the CLASS end mean zero or one, not many. The line needs a crow's foot to show many classes.
Section C: Definitions
Q1
crow's foot — ERD notation where a single bar at a line's end means one and a three-pronged crow's foot means many. The crow's foot end is the foreign key side of the relationship.
Section D: Fill in the Blanks
Q1
# | means one, < means many Teacher |--< Class # One teacher has many classes
Q2
# | means one, < means many Teacher |--< Class # One teacher has many classes
Q3
House |--< Student # The foreign key is in the Student table
Q4
# | means one, < means many House |--< Student # One House has many Students
Q5
# | = mandatory, o = optional Teacher |--o< Class # A teacher may have zero classes
Section E: Spot the Error
Q1
C — One class has many students, so the STUDENT end needs a crow's foot (|{). Two bars (||) would mean one class has only one student. It should be CLASS ||--|{ STUDENT.
Q2
A — The crow's foot is on the wrong end. One author writes many books, so the bar goes at AUTHOR and the crow's foot at BOOK: AUTHOR ||--o{ BOOK.
Q3
B — The bar is at OWNER and the crow's foot is at PET. So the diagram reads: one OWNER has many PETs, not the other way around.
Q4
D — The foreign key goes in the table at the crow's foot (many) end. PLAYER is the many side, so teamId is the foreign key in PLAYER, not TEAM.
Q5
C — The small circle (o) next to the crow's foot means optional (zero or many). A fan may have no tickets. A mandatory link would use a bar (|{) instead.