← WA Computer Science ATAR Unit 2

Functional dependency and determinants

A field is functionally dependent on another when the other field's value determines it. The determinant fixes the value: studentId determines studentName.

Understanding Functional dependency and determinants in WA Computer Science ATAR Unit 2

What it does: The field on the left of the arrow is the determinant. Knowing studentId tells you the one firstName that goes with it. The value Red is linked to both Ava and Zoe, so house does not determine firstName. This shows how to test a dependency in sample data. One studentId value fixes exactly one studentName, so studentId is the determinant and studentName depends on it. Two students can share a name, so the name cannot determine the ID. If one value of A could show up with several different B values, A would not determine B. Repeating a subjectId is fine as long as it always has the same name. Here 1 is always Maths, so subjectId → name holds.

Common mistakes: Many students share the same year level, so year cannot determine studentId. The dependency should be studentId -> year. Line 4 shows studentId 101 with the name Ava. If line 2 gave 101 a different name, one studentId would have two names and the dependency would fail. Line 2 should be 101, Ava.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 28–122) and word search (Modules 28–266).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
In a students table, studentId = 7 always has studentName = 'Ava'. Which statement is correct?
studentName is functionally dependent on studentIdstudentId is functionally dependent on studentName
Matches
studentName -> studentId (Ava appears for IDs 1 and 12)
↓
The dependency is written backwards. Ava matches two different studentId values, so studentName cannot determine studentId. It is studentId that determines studentName.
Applying
Meanings
Term
functional dependency
Meaning
A field is functionally dependent on another when the other field's value determines it. The determinant fixes the value: studentId determines studentName.
Practice
SELECT studentId, COUNT(DISTINCT firstName) AS names
Testing
Gaps
studentId studentName
Check Answer
Spots
2studentId -> name
3year -> studentId

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Wolverine' badge — Fearless Coder, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. In a students table, studentId = 7 always has studentName = 'Ava'. Which statement is correct?
A. studentName is functionally dependent on studentId ✓
B. studentId is functionally dependent on studentName
One studentId value fixes exactly one studentName, so studentId is the determinant and studentName depends on it. Two students can share a name, so the name cannot determine the ID.
2. In the notation studentId → studentName, which field is the determinant?
A. studentId ✓
B. studentName
The determinant is the field on the left of the arrow. Its value decides the value of the field on the right.
3. What does it mean when we say 'A determines B'?
A. Each value of A can be paired with many different values of B
B. Each value of A is always paired with exactly one value of B ✓
If one value of A could show up with several different B values, A would not determine B.
4. Sample data: (house, points) = (Red, 120), (Blue, 95), (Red, 150). Does house determine points?
A. Yes, because every row has a house value
B. No, because Red appears with two different points values ✓
A determinant must give one value every time. Red is paired with 120 and 150, so the dependency fails in this data.
5. Sample data: (subjectId, name) = (1, Maths), (2, English), (1, Maths), (3, Science). Does subjectId determine name?
A. Yes, because each subjectId always has the same name ✓
B. No, because subjectId 1 appears more than once
Repeating a subjectId is fine as long as it always has the same name. Here 1 is always Maths, so subjectId → name holds.

Match the Pairs

studentId -> studentName → studentName is functionally dependent on studentId: each studentId value determines exactly one studentName.
studentId 7 appears twice: Ava Nguyen, Ava Nguyen → Consistent sample data: the same studentId always gives the same name, so the dependency studentId -> studentName holds.
A determinant is the field whose value fixes the value of another field → studentId -> firstName
A dependency does not hold if one determinant value is linked to two different values → house -> firstName (Red: Ava, Zoe)
studentName -> studentId (Ava appears for IDs 1 and 12) → The dependency is written backwards. Ava matches two different studentId values, so studentName cannot determine studentId. It is studentId that determines studentName.
yearLevel -> studentId (Year 7: Ava, Mia) → yearLevel is wrongly named as a determinant. Year 7 matches more than one studentId, so one value of yearLevel does not fix a single studentId.

Key Term

functional dependency
A field is functionally dependent on another when the other field's value determines it. The determinant fixes the value: studentId determines studentName.

Fill in the Blanks

1. studentId -> studentName
Hint: Type the arrow symbol used in dependency notation to mean 'determines'.
2. -- The determinant fixes studentName studentId -> studentName
Hint: Type the field that is the determinant, the one whose value fixes the student's name.
3. studentId -> studentName -- studentId is the determinant field
Hint: Type the term for the field on the left side of a dependency arrow.
4. -- 101 Ava, 102 Liam, 103 Ava studentName -> studentId is false
Hint: Read the sample data. Type the Boolean word for whether one name always gives the same ID.
5. -- 101 Ava, 101 Ava, 102 Liam studentId -> studentName is true
Hint: Read the sample data. Type the Boolean word for whether each ID always gives the same name.

Spot the Error

Question 1
A Student(studentId, name, year)
B studentId -> name
C year -> studentId
D Determinant: studentId
Line C — Many students share the same year level, so year cannot determine studentId. The dependency should be studentId -> year.
Question 2
A studentId, studentName
B 101, Mia
C 102, Liam
D 101, Ava
E studentId -> studentName holds
Line B — Line 4 shows studentId 101 with the name Ava. If line 2 gave 101 a different name, one studentId would have two names and the dependency would fail. Line 2 should be 101, Ava.
Question 3
A studentId -> studentName
B Left side: determinant
C Right side: the determinant
Line C — In A -> B, the left side (A) is the determinant. The right side (B) is the dependent field, the one whose value is determined.
Question 4
A Sample: house, yearLevel
B Red, 7 and Red, 8
C One house, one year level
D house does not determine year
Line C — The sample data shows Red with both 7 and 8, so one house gives two year levels. That is why house does not determine yearLevel.
Question 5
A Product(productId, price)
B price -> productId
C Determinant: productId
Line B — Different products can have the same price, so price cannot determine productId. The dependency should be productId -> price.

Student with a class code? Join your class →