GRADE 9 · COMPUTING · UNIT 2 · LESSON 2.3

Managing data

Creating databases

Read a little. Try the workbook. Check your answers. Choose one section below to get started.

20 fillable worksheet pagesRead at your own pace

LET’S LOOK, THINK AND TRY

Creating databases

I can…
  • Create a simple table with clear fields and suitable data types
  • Explain the purpose of a unique primary key

Organise records with clear identifiers

A field is one named attribute, a record is a complete row, and a table holds records of the same kind. A primary key uniquely identifies a record. Related tables use matching identifiers rather than repeating every detail. Plan suitable types and validation to avoid inconsistent or orphaned references.

Separate selected columns from selected rows

A query can choose which fields to show and which records meet its criteria. AND requires both conditions; OR requires at least one. Use brackets to make combinations explicit. The original workbook uses fictional catalogue data and SQL examples to practise these ideas; it is not a live library system or a supplied publisher database.

Original PaxaKids learning scene for Creating databases. The scene supplies context, not assessed measurements or counts.
An original PaxaKids scene for this topic. Use the stated values and exact workbook diagrams for computing work.

Work through an original example

An original catalogue has B31: year 2019, available 1; B32: year 2021, available 0; B33: year 2016, available 1. Apply Year >= 2018 AND Available = 1.

Work through the reasoning

B31 meets both conditions. B32 meets the year condition but not availability. B33 is available but fails the year condition. Only B31 is selected. Choosing BookID and Title as output fields changes the displayed columns, not this rule for selecting rows.

Try it before the workbook

How many of these records meet Year >= 2018 OR Available = 1?

Use the example to choose your first step. This short preparation question is separate from your workbook. Open the check clue when you are ready.

Explore the clues

Open one card at a time to review your thinking.

Remember the idea

A field is one named attribute, a record is a complete row, and a table holds records of the same kind. A primary key uniquely identifies a record. Related tables use matching identifiers rather than repeating every detail. Plan suitable types and validation to avoid inconsistent or orphaned references.

Check your first try

3

Every record meets at least one condition: B31 meets both, B32 meets the year test and B33 meets availability.

Explain and check
  • Match exact code outputs, binary widths and stated units. Explain your method.
  • Check the question, rules, outputs and units. Explain why your method works.
Paxa the Fox

Think it through with Paxa!

Trace the stated rules and distinguish predictions from actual observations.

Original computing practice files

Optional small offline examples and fictional datasets, created for PaxaKids. They are supplementary practice, not publisher downloads or complete implementations of every workbook project. The page does not execute these files. Inspect code with a grown-up before using it in an approved offline environment; do not use real personal data.

Our Unit 2 learning path
  1. Lesson 2.1: Spreadsheets and analysing data
  2. Lesson 2.2: Creating real-life systems and evaluating pre-existing spreadsheets
  3. Lesson 2.3: Creating databases
  4. Lesson 2.4: Database systems
  5. Lesson 2.5: Original Paxa project: Library decisions dashboard
  6. Lesson 2.6: Check your progress
  7. Lesson 2.7: Managing data - unit check
For grown-ups: using this lesson

Discuss the idea and worked example, then try the workbook. Your answers are checked in your browser. Open responses need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses. Accept a sound alternative method.

Opening or checking a worksheet does not complete a lesson. Choose “Mark lesson finished” when ready. Optional account progress saves the selected grade, lesson position and completion across devices. Personal worksheet responses stay in this tab; save your own copy before leaving.

2. Fill in your workbook

Use the original diagrams and stated conventions. Choose, write or draw on the pages, or use the larger Answer List controls. Code examples here are for tracing; this page does not execute them or connect to hardware. Use fictional data and approved supervised tools for project work.

Creating databases20 student pages · original artwork

Opening your PDF…

Swipe sideways across the worksheet on a small screen, or use “Answer list” for larger controls.

TAKE YOUR PRACTICE OFFLINE

3. Download the student worksheet

All 20 original A4 student pages, ready for pencil-and-paper practice. Choose Review Answers to check your work on this webpage.

Student worksheet only · PDF · 6.7 MiB · No answer key included

Download worksheet PDF ↓

TRY FIRST, THEN CHECK TOGETHER

Download the student worksheet →

4. Answers & guidance

Finished your try? Open the guide and compare one worksheet at a time. Your own words may be different and still explain the right idea.

Shown on this webpage only. There is no answer-key download, and this guide is left out when printing the page.

Show answers for all 20 worksheets

Worksheet 1

  1. Question 1: What is the main purpose of this catalogue? Store and retrieve organised information about books

Worksheet 2

  1. Question 2: Which is a field name? Subject
  2. Question 3: Which describes one record? B003, Life Underwater, Science, 1
  3. Question 4: Number of named fields in this dataset 4

Worksheet 3

  1. Question 5: Number of book records, excluding the header 8
  2. Question 6: BookID for Electricity Lab B006 / b006

Worksheet 4

  1. Question 7: Suitable type for BookID TEXT / text
  2. Question 8: Suitable type for Title TEXT / text
  3. Question 9: Stored value meaning unavailable 0
  4. Question 10: Stored value meaning available 1
  5. Question 11: Why should B001 remain text? It is an identifier with a letter and leading zeros

Worksheet 5

  1. Question 12: Why is Subject unsuitable as the primary key here? Several records share the same subject
  2. Question 13: What should happen to a second row with BookID B001? Reject the duplicate ID without replacing the existing record
  3. Question 14: Field chosen as the primary key BookID / bookid

Worksheet 6

  1. Question 15: Which rule rejects an availability value of 2? CHECK (Available IN (0,1))

Worksheet 7

  1. Question 16: What should you check after importing? Eight records, four fields, intact IDs and values matching the source
  2. Question 17: Why should the first CSV row be treated as headers? It contains field names rather than a book record

Worksheet 8

  1. Question 18: Number of matching records in the original dataset 3
  2. Question 19: First title in the ascending result Biology Basics / biology basics
  3. Question 20: Why is Electricity Lab excluded? It is Science but its Available value is 0

Worksheet 9

  1. Question 21: Count: Science AND Available = 1 3
  2. Question 22: Count: Science OR Available = 1 7
  3. Question 23: Count: Science AND Available = 0 1
  4. Question 24: Which record matches Science OR Available = 1 but not Science AND Available = 1? B006 Electricity Lab

Worksheet 10

  1. Question 25: What makes a useful query test? Compare the actual returned IDs with an independently expected set

Worksheet 11

  1. Question 26: Number of original unavailable records 2
  2. Question 27: What happens to the total eight records after an ordinary SELECT filter? All eight remain stored in Books
  3. Question 28: What does ORDER BY Title change? The order of the displayed results

Worksheet 12

  1. Question 29: Title returned by the B% query Biology Basics / biology basics
  2. Question 30: Title returned by the %Lab query Electricity Lab / electricity lab
  3. Question 31: SQLite LIKE wildcard matching zero or more characters %

Worksheet 13

  1. Question 32: Duplicate B001: accept or reject? reject / REJECT
  2. Question 33: New ID, Available = 2: accept or reject? reject / REJECT
  3. Question 34: New ID, Available = 0: accept or reject? accept / ACCEPT
  4. Question 35: For the valid Available = 0 test, what else is required? A new non-empty ID and present title and subject

Worksheet 14

  1. Question 36: What catches B006 being mistyped as available? Comparison with the unchanged source record
  2. Question 37: Available-science count if only B006 changes from 0 to 1 4
  3. Question 38: What should you do after correcting Scince to Science? Repeat the affected query and compare the result with expectation

Worksheet 15

  1. Question 39: Which data is sufficient for the current catalogue practice? Fictional BookID, Title, Subject and Available
  2. Question 40: Which result best fits a request for available science titles? Only the relevant catalogue IDs and titles

Worksheet 16

  1. Question 41: Foreign-key field in Loans BookID / bookid
  2. Question 42: Why can BookID repeat in Loans? The same book may have several different loan events

Worksheet 17

  1. Question 43: What does a foreign-key check help prevent? A loan referring to a BookID absent from Books
  2. Question 44: Does separating tables automatically prove every title is true? No; the source values still need verification

Worksheet 18

  1. Question 45: Which concern is mainly about veracity? Some branch records are missing or inaccurate

Worksheet 19

  1. Question 46: Sketch or annotate the fields, types and key. Identify your saved database and query. Show expected matching IDs, observed results or Pending, the duplicate and invalid-value tests, and one accuracy or privacy improvement. Require an actual saved database and query, or explicit practical Pending. Use four fields: BookID TEXT, Title TEXT, Subject TEXT, and Available as a Boolean idea stored as INTEGER constrained to 0 or 1. Preserve all eight original rows. Require a unique non-empty BookID; the shown SQLite definition adds NOT NULL and a non-empty check. Accept equivalent GUI rules. Science AND Available = 1 returns B008 Biology Basics, B003 Life Underwater and B001 Planet Earth in ascending Title order. Reject duplicate B001 and availability 2; accept availability 0 with a new valid ID and the other required values. Separate expected results from observed results or Pending. Check every source row, including B006 being unavailable. Use fictional catalogue data, appropriate access and separate test copies. Give qualitative feedback without marks. Grown-up review; discuss your evidence and reasoning.

Worksheet 20

  1. Question 47: Explain your field types and primary key, how AND selects the required records, and why your test results support the design. Distinguish validation from verification against the source. Describe one limitation or improvement, including privacy; add a relational or big-data insight if you completed an extension. Accept an explanation linked to evidence: distinguish fields from records; text preserves the letter and leading zeros in BookID; define availability 0 and 1; explain how required unique non-empty IDs prevent ambiguous identification. AND requires both Science and Available = 1. The matching IDs are B001, B003 and B008, with title order only when requested. SELECT filters without deleting source rows. Valid-range mistakes can pass validation, so compare records with the source: changing only B006 to available raises the match count to 4. Record actual observations honestly, or Pending. Keep only fictional catalogue data and necessary fields. Relational extension: BookID is primary in Books and foreign in Loans; one book can have many loan events; separation reduces redundancy and enforced referential integrity prevents absent referenced IDs. Big-data extension: discuss volume, velocity, variety, veracity or value with a relevant quality, coverage or privacy limit. Accept equivalent correct SQL or GUI approaches. Grown-up review; discuss your evidence and reasoning.
Back to my workbook ↑

Curriculum & workbook reference

Computing for your homeschool day

Explore Creating databases with this free Grade 9 Computing lesson. Read one idea together, try the fillable workbook and return to review at your own pace. Download the same student worksheet PDF for pencil-and-paper practice.

Fit learning around your family’s day. There is no timer and no sign-up is needed to use the lesson. An optional account saves your lesson position and completion across devices. Workbook responses and drawings stay in this tab; save a copy of your responses before leaving.

Understand your results

Closed answers are checked in your browser. Drawings and written explanations need grown-up review and are shown separately from the automatic score. Check your work, then use “Retry answers to practise” to revisit mistakes while keeping correct responses.

Choose Review Answers after trying the activity. The guide stays on the webpage; the worksheet download contains only the student pages.

For programme background, visit the Cambridge Lower Secondary Computing overview. PaxaKids provides independent original companion practice.

The references identify database organisation and multi-criterion query teaching. SQL and the fictional school-library dataset are original PaxaKids practice; publisher software files are not included.

The page references identify the reviewed actual supplied book teaching and related practice. Only the cited Learner’s Book teaching pages are listed here. No matching publisher Workbook 9 was supplied or cited. The original PaxaKids workbook is the student download; no textbook scan is published. Explanations, worked models and student workbooks here are original PaxaKids companion material.

The source topic number is preserved.