IB Computer Science HL · Year 2 · Lesson 44

ERDs, data types and relational table construction

Database design moves from real-world entities to schemas, keys, relationships and normalized tables.

Paper 150 minutesA3.2.2 · A3.2.3 · A3.2.4
Today’s targets

What you need to be able to do

2 / 9
  • ConstructERDs
  • OutlineThe different data types used in relational databases
  • ConstructTables for relational databases
A3.2.2A3.2.3A3.2.4
Paper 1 lensMatch the depth of every response to the command term. Previously learned content can move quickly, but retrieval must still be accurate.
Retrieve

Rapid Recall Deck

3 / 9

Say the answer aloud before flipping. Mark secure knowledge quickly and spend time on the gaps.

  • What is an entity in an ERD?: A person, object, event, or concept about which the database stores data.
  • What does a relationship in an ERD show?: How two entities are associated with one another.
  • What does cardinality describe?: The maximum number of instances that may participate in a relationship, such as one-to-one, one-to-many, or many-to-many.
  • What does modality describe?: Whether participation in a relationship is optional or mandatory—the minimum participation.
  • How do primary and foreign keys link relational tables?: A primary key uniquely identifies a row in one table; a foreign key in another table stores a matching value to reference that row.
  • Why does choosing the correct data type matter in a relational table?: It supports valid values, consistent comparisons/storage, integrity, and efficient operations; the wrong type can cause invalid data or conversion/processing problems.
  • What is the purpose of a composite or concatenated key?: To use multiple fields together when no single field uniquely identifies the required record or relationship.
A3.2.2 + A3.2.3 · Learn

Core knowledge and application

4 / 9
A3.2.2Construct

ERDs

Database design moves from real-world entities to schemas, keys, relationships and normalized tables.

Exam moveProduce the required code, diagram, query, model or representation accurately.
Required detail 1The significance of entity relationship diagrams (ERDs) in crafting organized, efficient database designs tailored for specific applications
Required detail 2The relationships between different data entities within a database
Required detail 3Roles of cardinality and modality in defining relationships in ERDs

Explain it without notes

Construct: ERDs in the context of a library database being redesigned to reduce redundancy and anomalies.

  • The significance of entity relationship diagrams (ERDs) in crafting organized, efficient database designs tailored for specific applications
  • The relationships between different data entities within a database
  • Roles of cardinality and modality in defining relationships in ERDs
A3.2.3Outline

The different data types used in relational databases

Database design moves from real-world entities to schemas, keys, relationships and normalized tables.

Exam moveGive a brief, focused account containing the essential points.
Required detail 1The importance of data type consistency
Required detail 2The potential effects of choosing the wrong data type

Explain it without notes

Outline: The different data types used in relational databases in the context of a library database being redesigned to reduce redundancy and anomalies.

  • The importance of data type consistency
  • The potential effects of choosing the wrong data type
A3.2.4 · Learn

Core knowledge and application

5 / 9
A3.2.4Construct

Tables for relational databases

Database design moves from real-world entities to schemas, keys, relationships and normalized tables.

Exam moveProduce the required code, diagram, query, model or representation accurately.
Required detail 1The relationship between tables using primary keys, foreign keys, composite keys and concatenated keys
Required detail 2The importance of well-defined tables in ensuring data integrity

Explain it without notes

Construct: Tables for relational databases in the context of a library database being redesigned to reduce redundancy and anomalies.

  • The relationship between tables using primary keys, foreign keys, composite keys and concatenated keys
  • The importance of well-defined tables in ensuring data integrity
Worked example · A3.2.2–A3.2.4

ERD to relational tables

6 / 9

Many-to-many relationship resolved with an associative entity

STUDENTStudentID (PK)
Name
1 → 0..*
ENROLLMENTStudentID (PK/FK)
CourseID (PK/FK)
Grade
0..* ← 1
COURSECourseID (PK)
Title

Cardinality tells how many instances can relate; modality/optionality indicates whether participation can be zero or is required.

STUDENT(StudentID PK, Name)
COURSE(CourseID PK, Title)
ENROLLMENT(StudentID PK/FK, CourseID PK/FK, Grade)
Data-type checkChoose appropriate types for IDs, names, dates, prices and Boolean flags. Explain how an inappropriate type can cause validation, sorting, storage or integrity problems.
Apply

Transfer to a new scenario

7 / 9
ScenarioA library database being redesigned to reduce redundancy and anomalies needs a design or technical decision related to today’s topic. Explain what matters and why.
  • The significance of entity relationship diagrams (ERDs) in crafting organized, efficient database designs tailored for specific applications
  • The relationships between different data entities within a database
  • The importance of data type consistency
  • The potential effects of choosing the wrong data type
  • The relationship between tables using primary keys, foreign keys, composite keys and concatenated keys
  • The importance of well-defined tables in ensuring data integrity
Exam lens

Paper 1 practice

8 / 9
Build the response before checking notesUse precise terminology and match the required depth.
  1. Construct: ERDs in the context of a library database being redesigned to reduce redundancy and anomalies.
  2. Outline: The different data types used in relational databases in the context of a library database being redesigned to reduce redundancy and anomalies.
  3. Construct: Tables for relational databases in the context of a library database being redesigned to reduce redundancy and anomalies.
Self-checkAnswer the exact command term. For explain, include mechanism/reason; for compare, pair criteria; for discuss/evaluate/justify, build supported reasoning and a conclusion.
Homework

Finish the learning cycle

9 / 9

IA — main task

Complete Criterion E and final IA quality checks. Evaluate the product against success criteria and propose specific, feasible improvements.

Syllabus — short

Complete a short Paper 1 retrieval task; keep the IA as the main workload.