Knowledge Guide
HomeDatabasesNormalization

Solution to Exercise 1

Analysis

Step 1: Identify the Primary Key

Step 2: Check for Partial Dependencies

Conversion to Second Normal Form (2NF)

To achieve 2NF, we need to remove partial dependencies by creating separate tables for each entity.

Step 1: Create the Employee Table

This table stores information specific to each employee.

Employee Table

Employee_ID (PK)Employee_Name
101Alice
102Bob
103Charlie

Step 2: Create the Project Table

This table stores information specific to each project.

Project Table

Project_ID (PK)Project_NameProject_Manager
P1AlphaJohn
P2BetaSarah
P3GammaAlice

Step 3: Create the Employee_Project Table

This table links employees to the projects they are working on.

Employee_Project Table

Employee_ID (PK)(FK)Project_ID (PK)(FK)
101P1
101P2
102P1
103P3

Final Result

By decomposing the original table into three tables, we have:

🤖 Don't fully get this? Learn it with Claude

Stuck on Solution to Exercise 1? Open Claude, copy a block below, and it'll teach you this exact concept — visually and interactively.

🪜 Hint ladder (no spoilers)

Progressively stronger hints — you still solve it.

I'm working on the problem **Solution to Exercise 1** (Databases). Give me a HINT LADDER: start with the tiniest nudge, then wait. Only reveal the next, stronger hint when I ask. Do NOT show the full solution unless I type 'show solution'. Keep me doing the thinking. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🎨 Explain the approach visually

See the technique, not just code.

Explain the optimal approach to **Solution to Exercise 1** with a VISUAL walkthrough: trace it on a small concrete example using ASCII art / a step-by-step diagram, narrate what changes each step, then give time & space complexity with a one-line derivation. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🔍 Review my solution

Catch bugs, edge cases, sub-optimality.

I'll paste my solution to **Solution to Exercise 1**. Review it for correctness, missed edge cases, and time/space complexity, then coach me toward the optimal — don't just rewrite it. Ask me to paste my code now. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.
🔁 Drill the pattern

Lock in recognition with look-alikes.

Give me 2 problems that use the SAME underlying pattern as **Solution to Exercise 1**. For each, let me attempt first, then review my answer and name the trigger signal that reveals the pattern. If you're unsure or a claim isn't standard, say so and reason from first principles instead of guessing.

📝 My notes