0% found this document useful (0 votes)
37 views4 pages

IGCSE Computer Science: Databases Overview

Chapter 9 of IGCSE Computer Science covers single-table databases, which are structured collections of data that ensure consistency and eliminate duplication. It explains key concepts such as fields, records, validation, primary keys, and basic SQL commands for data management. Practical skills emphasized include defining databases, selecting primary keys, and writing SQL queries.

Uploaded by

z5knz24zq6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views4 pages

IGCSE Computer Science: Databases Overview

Chapter 9 of IGCSE Computer Science covers single-table databases, which are structured collections of data that ensure consistency and eliminate duplication. It explains key concepts such as fields, records, validation, primary keys, and basic SQL commands for data management. Practical skills emphasized include defining databases, selecting primary keys, and writing SQL queries.

Uploaded by

z5knz24zq6
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IGCSE Computer Science – Databases (Chapter 9)

1. Single-Table Databases

 Database: Structured collec on of data that allows easy informa on retrieval.

 Single-table database: Contains only one table.

 Why useful?

o Changes/addi ons made once → data consistent

o Same data used by everyone

o No duplica on (in rela onal DBs)

Examples of use:

 People: pa ents in hospital, pupils at school

 Things: cars for sale, books in library

 Events: hotel bookings, race results

2. Fields & Records

 Field → column → stores specific type of data (e.g., FirstName, WardNumber)

 Record → row → data about one person/item/event

 Table: Contains many records, each with the same fields

 Field naming rules: single word, no spaces (e.g., BedNumber)

3. Valida on

 Purpose: Ensures data entered is sensible & acceptable

 Types:

o Automa c: e.g., date field only accepts valid dates

o Custom (manual): set by developer (e.g., WardNumber between 1–10)


4. Basic Data Types

Syllabus Data Type Descrip on Access Equivalent

Text/Alphanumeric Several characters Short/Long text

Character Single character Short text (size 1)

Boolean TRUE/FALSE, 1/0, Yes/No Yes/No

Integer Whole number Number (0 decimal places)

Real Decimal number Number (decimal)

Date/Time Date and/or me Date/Time

5. Primary Key

 Unique field in a table to iden fy each record

 Must be unique – no duplicates allowed

 Can use exis ng unique field (e.g., ISBN) or create a new one

 Example: HospitalNumber (format: HN######)

6. SQL Basics

SQL = Structured Query Language → used to retrieve/manage data.

Common Commands:

 SELECT → choose fields to display

 FROM → choose table

 WHERE → set condi ons

 ORDER BY → sort results (ASC/DESC)

 SUM() → total of a numeric field

 COUNT() → count matching records


Example:

SELECT HospitalNumber, FirstName, FamilyName

FROM PATIENT

WHERE Consultant = 'Mr Smith';

Condi on Operators

Operator Meaning

= Equal to

> Greater than

< Less than

>= Greater than or equal

<= Less than or equal

<> Not equal

BETWEEN Between two values

LIKE Matches a pa ern

IN Matches any in a list

AND Both condi ons true

OR Either condi on true

NOT Condi on false

Sor ng:

ORDER BY FamilyName; -- ascending

ORDER BY FamilyName DESC; -- descending


Coun ng & Summing:

SELECT COUNT(*) FROM PATIENT WHERE WardNumber = 7;

SELECT SUM(Badges) FROM CUB;

7. Prac cal Skills Needed

 Define single-table database from requirements

 Choose suitable primary key

 Write, complete & understand SQL queries

Tip for Exams:

 Always write field names exactly as in table (case doesn’t ma er in SQL but ma ers
in your answer)

 For text & date values → enclose in quotes (' '), in Access dates use # #

 Understand difference between valida on (computer checks) and verifica on


(human confirma on)

You might also like