18.1

Topic 18

Create a database structure

  • IGCSE I.C.T 0417
  • 2 min read
  • Syllabus 2026, 2027 and 2028

Objectives

  1. 1

    Create an appropriate database structure

    • aImport data from existing files (including.csv,.txt) using specified field names to create tables
    • bSet appropriate data types to fields including text, numeric (integer, decimal, currency), date/time, Boolean/logical
    • cSet sub-types of numeric data including percentage, number of decimal places
    • dSet display format of Boolean/logical field (yes/no, true/false, checkbox)
    • eSet display format of date/time data
    • fCreate and edit primary and foreign keys
    • gCreate relationships between tables
  2. 2

    Create and use a data entry form

    • aCreate a data entry form including specified fields, appropriate font styles and sizes, appropriate spacing between fields, character spacing of individual fields, use of white space, radio buttons, check boxes, drop down menus
  3. 3

    Types of database

    • aCharacteristics, uses, advantages and disadvantages of a flat file and a relational database
  4. 4

    Primary and foreign keys

    • aCharacteristics of primary key and foreign keys
  5. 5

    Form design

    • aCharacteristics of good form design

Cambridge IGCSE ICT 0417 syllabus 2026-2028, 18.1 Create a database structure (copied for internal use as permitted by Cambridge)

Detailed · Deep study

1Creating the structure

  1. Import data from existing files (.csv, .txt) to create a table, using the specified field names; check the first row is used for field names if needed.
  2. Set appropriate data types for each field and their sub-types and display formats (below).
  3. Create and edit primary and foreign keys, then create relationships between tables (usually one-to-many).
Data typeUseDisplay formats
textletters, symbols and numbers not used in calculations (names, phone numbers, IDs)field size (length)
numeric: integerwhole numbers–
numeric: decimalnumbers with a fractional partnumber of decimal places; percentage
numeric: currencymoneycurrency symbol and 2 decimal places
date/timedates and timese.g. short date DD/MM/YYYY, long date, time
Boolean/logicalonly two valuesyes/no, true/false or a checkbox

2Keys and types of database

Fig. 1Primary and foreign keys.
KeyCharacteristics
primary keya field that holds a unique value for every record, so each record can be identified; cannot be empty
foreign keya field in one table that is the primary key of another table; it links the tables and need not be unique in its own table
Flat file databaseRelational database
structureone table holding all the datatwo or more tables linked by key fields
advantagessimple to set up and use; fine for small amounts of datalittle duplicate data, so less storage and fewer inconsistencies; easier to update; more flexible queries
disadvantagesdata is repeated (redundancy), wasting space and causing errors when updatingmore complex to design and set up; needs more skill

3Data entry forms

A data entry form lets users add or edit one record at a time. Create it with the specified fields, appropriate font styles and sizes, sensible spacing between fields, suitable character spacing (box width) for each field, plenty of white space, and controls such as radio buttons, check boxes and drop-down menus.

  • Good form design: a clear title; instructions; fields in a logical order; clear labels next to each box; boxes the right size for the data; controls that restrict choices (fewer errors); not cluttered; consistent fonts and colours; navigation buttons (next, previous, save).

4Exam focus

Key words: import; field; data type; integer; currency; Boolean; primary key; foreign key; relationship; flat file; relational; data entry form.

Quick self-check

Answer in your head first, then reveal.

  1. Primary key uniquely identifies each record in its table (1); foreign key is a field that is the primary key of another table, used to link them (1).

  2. Any two: less duplication; less storage; fewer inconsistencies; easier to update (2).

  3. Any three: clear title; labels; logical order; suitable box sizes; drop-downs/radio buttons; white space (3).

Finished this subtopic? Track it on your subject page.