Question Simulator

IGCSE ICT (0417)

Databases Rare

2 questions · about 1% of the marks we indexed · examined in 2 of 9 sessions.

Questions by year

2022

  • 2022 Oct/Nov · Paper 12 · Q7 (a)6 marksDatabases vs other methods
  • 2022 May/June · Paper 12 · Q9 (d)2 marksDatabases vs other methods

References only, not question text. Open Official paper ↗ where Cambridge publishes the paper, or see the official Cambridge past-papers page; for other papers, ask your school. “Paper 42” means Paper 4, variant 2.

Practice questions

Original questions written by HomiLabs in the style of the exam, with answers and mark schemes. They are not Cambridge past paper questions and have not been reviewed by Cambridge. Try each one before opening the answer.

Q1Databases vs other methods · Core · Paper 1 style · 6 marks
  1. (a) Describe what is meant by a flat-file database. [2]
  2. (b) Describe what is meant by a relational database. [2]
  3. (c) Give two advantages of a relational database over a flat-file database. [2]
Show answer
  1. (a) A database that stores all its data in a single table, so data about different things (for example customers and their orders) is held together in one file.
    1 mark each for: data held in one table/file | each record holds all the data / no links to other tables (data often repeated).
  2. (b) A database made of two or more tables that are linked by relationships using key fields (a primary key in one table matching a foreign key in another).
    1 mark each for: data stored in more than one table | tables linked using common/key fields (primary key – foreign key).
  3. (c) Data is stored only once, so there is less duplication (redundancy) and less storage is used; updating data in one place keeps it consistent everywhere, so there are fewer errors.
    1 mark each for any two of: less data redundancy/duplication | less storage needed | data consistency/integrity – change once | fewer data entry errors | more complex queries/reports across tables | easier to add new types of data | better security – access to tables can be restricted.
Q2Databases vs other methods · Core · Paper 1 style · 7 marks

A sports club in Sialkot stores these fields about each member: MemberID, FirstName, DateOfBirth, PhoneNumber, FeesPaid (whether this year's fees are paid), FeeAmount (in rupees, e.g. 3500.00).

  1. (a) State the most suitable data type for each field: MemberID (e.g. M0451), DateOfBirth, PhoneNumber (e.g. 03001234567), FeesPaid, FeeAmount. [5]
  2. (b) Explain why PhoneNumber should not be stored as a numeric field. [2]
Show answer
  1. (a) MemberID – text/alphanumeric; DateOfBirth – date/time; PhoneNumber – text/alphanumeric; FeesPaid – Boolean (logical, Yes/No); FeeAmount – currency (or numeric, 2 decimal places).
    1 mark for each correct data type.
  2. (b) A numeric field would remove the leading zero, and phone numbers are never used in calculations (they may also contain + or spaces).
    1 mark each for any two of: leading zero would be lost | no calculations are carried out on it | may contain symbols such as + or spaces/dashes | may be longer than some number formats allow.
Q3Databases vs other methods · Core · Paper 1 style · 4 marks
  1. (a) State what is meant by a primary key. [2]
  2. (b) A supermarket stores data about products with these fields: ProductName, Barcode, Category, Price, Supplier. Identify the most suitable primary key and explain why ProductName would not be suitable. [2]
Show answer
  1. (a) A field that holds a unique value for every record, so it can be used to identify each record.
    1 mark each for: a field (key field) | unique value for each record / identifies each record. Cannot be empty.
  2. (b) Barcode – every product has a different barcode number. ProductName is unsuitable because two products (e.g. different sizes) can share the same name.
    1 mark: Barcode. 1 mark: two products (e.g. different sizes/brands) can have the same name, so ProductName is not unique.
Q4Databases vs other methods · Core · Paper 1 style · 4 marks
  1. (a) A data entry form is used to add records to a database. Describe three features of a well-designed data entry form. [3]
  2. (b) Give one advantage of using a drop-down list on a form for the field Province. [1]
Show answer
  1. (a) Clear labels or instructions next to each box; drop-down lists or option buttons for fields with fixed choices; validation that shows an error message when invalid data is entered.
    1 mark each for any three of: clear title | clear labels/instructions | fields in a logical order | appropriate size boxes / character boxes | drop-down menus / radio buttons / tick boxes | validation with helpful error messages | navigation buttons (next, previous, save, new record) | not cluttered – white space | consistent fonts/colours.
  2. (b) The user can only choose from valid options, so spelling mistakes are avoided and data entry is faster.
    B1: prevents spelling/typing errors | only valid entries | faster entry | consistent data for searching.
Q5Databases vs other methods · Core · Paper 2 style · 7 marks

A file called plants.csv is to be imported into a new database table. The first rows are:PlantCode,CommonName,Height_cm,Price,Indoor,DateAddedPL031,Snake plant,45,1250.00,Y,12/01/2026PL032,Money plant,30,650.50,Y,15/01/2026PL033,Bougainvillea,120,2100.00,N,20/01/2026

  1. (a) State the data type you would set for each of the six fields. [6]
  2. (b) State which field should be the primary key. [1]
Show answer
  1. (a) PlantCode – text; CommonName – text; Height_cm – number (integer); Price – currency (2 decimal places, Rs); Indoor – Boolean (Yes/No); DateAdded – date/time (dd/mm/yyyy).
    1 mark for each field. Accept numeric/decimal with 2 dp for Price; accept logical for Indoor.
  2. (b) PlantCode.
    B1 PlantCode.
Q6Databases vs other methods · Core · Paper 2 style · 4 marks

A school library in Lahore stores data about books.Table BOOKS:BookID | Title | Genre | Pages | Price | AvailableL101 | The Hidden Valley | Fiction | 312 | 1450 | YL102 | Atoms and Us | Science | 228 | 1890 | YL103 | Silk Road Tales | History | 410 | 2100 | NL104 | Coding for Teens | Science | 196 | 1350 | YL105 | Monsoon Days | Fiction | 254 | 980 | YL106 | Stars Above Thar | Science | 340 | 1200 | NL107 | Indus Cities | History | 288 | 1750 | YL108 | The Last Kite | Fiction | 176 | 850 | NL109 | Plant Power | Science | 150 | 990 | YL110 | Mughal Gardens | History | 365 | 2450 | YL111 | City of Lights | Fiction | 402 | 1600 | YL112 | Weather Watchers | Science | 268 | 1499 | Y(Price is in rupees. Available is a Boolean field: Y = Yes, N = No.)

  1. (a) A search is needed to find all books in the Science genre. State the field and the criterion you would enter. [2]
  2. (b) State how many records the search will find and list their BookIDs. [2]
Show answer
  1. (a) Field: Genre; criterion: = "Science".
    1 mark: Genre field. 1 mark: criterion Science (accept ="Science").
  2. (b) 5 records: L102, L104, L106, L109, L112.
    1 mark: 5. 1 mark: all BookIDs listed correctly.
Q7Databases vs other methods · Core · Paper 2 style · 4 marks

A school library in Lahore stores data about books.Table BOOKS:BookID | Title | Genre | Pages | Price | AvailableL101 | The Hidden Valley | Fiction | 312 | 1450 | YL102 | Atoms and Us | Science | 228 | 1890 | YL103 | Silk Road Tales | History | 410 | 2100 | NL104 | Coding for Teens | Science | 196 | 1350 | YL105 | Monsoon Days | Fiction | 254 | 980 | YL106 | Stars Above Thar | Science | 340 | 1200 | NL107 | Indus Cities | History | 288 | 1750 | YL108 | The Last Kite | Fiction | 176 | 850 | NL109 | Plant Power | Science | 150 | 990 | YL110 | Mughal Gardens | History | 365 | 2450 | YL111 | City of Lights | Fiction | 402 | 1600 | YL112 | Weather Watchers | Science | 268 | 1499 | Y(Price is in rupees. Available is a Boolean field: Y = Yes, N = No.)

  1. (a) All records are sorted into ascending order of Genre and then into descending order of Pages. State the BookIDs of the first three records. [3]
  2. (b) State the BookID of the last record. [1]
Show answer
  1. (a) L111, L101, L105.
    1 mark each in the correct position. Fiction comes first alphabetically; within Fiction, most pages first: City of Lights 402, The Hidden Valley 312, Monsoon Days 254.
  2. (b) L109.
    B1: Science is last alphabetically; Plant Power has the fewest pages (150).
Q8Databases vs other methods · Core · Paper 2 style · 3 marks

A school library in Lahore stores data about books.Table BOOKS:BookID | Title | Genre | Pages | Price | AvailableL101 | The Hidden Valley | Fiction | 312 | 1450 | YL102 | Atoms and Us | Science | 228 | 1890 | YL103 | Silk Road Tales | History | 410 | 2100 | NL104 | Coding for Teens | Science | 196 | 1350 | YL105 | Monsoon Days | Fiction | 254 | 980 | YL106 | Stars Above Thar | Science | 340 | 1200 | NL107 | Indus Cities | History | 288 | 1750 | YL108 | The Last Kite | Fiction | 176 | 850 | NL109 | Plant Power | Science | 150 | 990 | YL110 | Mughal Gardens | History | 365 | 2450 | YL111 | City of Lights | Fiction | 402 | 1600 | YL112 | Weather Watchers | Science | 268 | 1499 | Y(Price is in rupees. Available is a Boolean field: Y = Yes, N = No.)

  1. (a) State the criterion entered in the Available field to find books that are currently out on loan (not available). [1]
  2. (b) State the number of books found and the total value of these books. [2]
Show answer
  1. (a) No (accept False / N / 0).
    B1 No/False.
  2. (b) 3 books; total value Rs 4150.
    1 mark: 3. 1 mark: Rs 4150 (2100 + 1200 + 850).
Q9Databases vs other methods · Core · Paper 2 style · 4 marks

A gym in Islamabad stores data about its members.Table MEMBERS:MemberID | FirstName | LastName | Email | JoinDate | PlanG01 | Sadia | Malik | sadia.m@mailbox.pk | 14/02/2025 | GoldG02 | Ahmed | Siddiqui | ahmed77@webpost.com | 03/06/2025 | SilverG03 | Saba | Qureshi | saba.q@mailbox.pk | 21/09/2025 | GoldG04 | Tariq | Saleem | tsaleem@quicknet.org | 11/11/2025 | BronzeG05 | Hina | Shah | hina.shah@webpost.com | 05/01/2026 | SilverG06 | Kamran | Butt | kbutt@mailbox.pk | 28/01/2026 | GoldG07 | Sameer | Raza | sameer.r@quicknet.org | 17/02/2026 | BronzeG08 | Noor | Sultan | noor.s@mailbox.pk | 09/03/2026 | SilverG09 | Ali | Hassan | ali.h@webpost.com | 30/04/2026 | GoldG10 | Mehwish | Iqbal | mehwish.i@mailbox.pk | 22/05/2026 | Bronze(JoinDate is a date field in dd/mm/yyyy format.)

  1. (a) Write the criterion for the LastName field to find all members whose last name begins with S. [2]
  2. (b) State how many records are found and list their MemberIDs. [2]
Show answer
  1. (a) Like "S*"
    1 mark: Like operator. 1 mark: "S*" wildcard after the letter.
  2. (b) 4: G02, G04, G05, G08.
    1 mark: 4. 1 mark: correct IDs.
Q10Databases vs other methods · Core · Paper 2 style · 6 marks

A report is needed from a database table called EVENTS that holds data about school events. The report must show only the fields EventName, EventDate and Venue, be in landscape orientation, have the title 'Events for Term 2' and show the student's name at the bottom of every page.

  1. (a) Describe the steps needed to produce this report. [4]
  2. (b) Explain why the title should be placed in the report header and the name in the page footer. [2]
Show answer
  1. (a) Create a query (or use the report wizard) selecting only EventName, EventDate and Venue; create the report from it and choose landscape orientation in page setup; type 'Events for Term 2' in the report header; add the student's name as a label in the page footer.
    1 mark each: only the three required fields selected | landscape orientation set | title in report header, typed exactly | name placed in page footer (so it appears on every page).
  2. (b) The report header appears once at the start of the report, which suits a title; the page footer appears at the bottom of every page, as required for the name.
    1 mark each.
Q11Databases vs other methods · Standard · Paper 1 style · 6 marks

A teacher in Karachi keeps records of 400 students' marks in a spreadsheet. The school's IT manager suggests moving the records into a relational database.

  1. (a) Compare using a database with using a spreadsheet to store and process the student records. [6]
Show answer
  1. (a) Both store data in rows and columns and can sort and search it. A spreadsheet is better for calculations, what-if modelling and charts, whereas a database is better for storing large amounts of related data. A database can use validation and forms to control data entry more strongly and links several tables (students, subjects, marks) so data is stored once, whereas a spreadsheet often repeats data. A database is better for complex queries and reports and allows multiple users to edit records at the same time, while a spreadsheet is easier to set up and learn.
    1 mark for a similarity (both rows/columns, sort, search, filter, charts/reports). Up to 5 marks for linked differences: database handles large volumes of related data vs spreadsheet better for numerical calculation/modelling | database tables linked – less redundancy vs spreadsheet data duplicated | database queries on multiple criteria/reports easier | database forms and validation control input | database supports many simultaneous users/access rights | spreadsheet quicker to set up/easier to learn | spreadsheet better for graphs/what-if. Each difference must refer to both.
Q12Databases vs other methods · Standard · Paper 1 style · 7 marks

A small taxi company in Islamabad stores all its data in one table. Part of the table is shown.Table BOOKINGS:BookingID | Date | CustomerName | CustomerPhone | DriverName | DriverPhoneB201 | 03/03/2026 | Faiza Khan | 03215550101 | Imran Ali | 03335550919B202 | 03/03/2026 | Omar Shah | 03015550244 | Imran Ali | 03335550919B203 | 04/03/2026 | Faiza Khan | 03215550101 | Nadia Riaz | 03455550377B204 | 05/03/2026 | Faiza Khan | 03215550110 | Imran Ali | 03335550919

  1. (a) Identify two examples of data redundancy in this table. [2]
  2. (b) Explain the problem shown by booking B204. [2]
  3. (c) Describe how the data could be stored as a relational database to remove these problems. [3]
Show answer
  1. (a) Imran Ali's name and phone number are stored three times; Faiza Khan's name is stored three times (and her phone number twice).
    1 mark each for any two: driver Imran Ali + 03335550919 repeated | customer Faiza Khan repeated | Faiza Khan's phone repeated | date 03/03/2026 repeated (accept).
  2. (b) Faiza Khan's phone number is different from the other two records (03215550110 instead of 03215550101), so the data is inconsistent – it is not clear which number is correct, probably caused by typing the repeated data again.
    1 mark: identifies inconsistent phone number for the same customer. 1 mark: caused by re-entering duplicated data / impossible to know which is correct (data integrity problem).
  3. (c) Split it into three tables: CUSTOMERS (CustomerID primary key, name, phone), DRIVERS (DriverID primary key, name, phone) and BOOKINGS (BookingID, Date, CustomerID, DriverID). CustomerID and DriverID are foreign keys in BOOKINGS, creating one-to-many relationships, so each customer's and driver's details are stored only once.
    1 mark: separate CUSTOMERS and DRIVERS tables (and BOOKINGS). 1 mark: each with its own primary key (CustomerID, DriverID). 1 mark: BOOKINGS holds foreign keys / one-to-many relationships so details stored once.
Q13Databases vs other methods · Standard · Paper 1 style · 6 marks

A hospital database has two tables.PATIENT (PatientID, Name, DateOfBirth, Ward)APPOINTMENT (AppointmentID, PatientID, AppointmentDate, Doctor)

  1. (a) Identify the primary key in each table. [2]
  2. (b) Identify the foreign key and state which table it is in. [2]
  3. (c) State the type of relationship between PATIENT and APPOINTMENT and explain why. [2]
Show answer
  1. (a) PATIENT: PatientID; APPOINTMENT: AppointmentID.
    1 mark for each.
  2. (b) PatientID in the APPOINTMENT table.
    1 mark: PatientID. 1 mark: in APPOINTMENT.
  3. (c) One-to-many – one patient can have many appointments, but each appointment belongs to only one patient.
    1 mark: one-to-many (PATIENT one side). 1 mark: one patient many appointments, each appointment one patient.
Q14Databases vs other methods · Standard · Paper 2 style · 5 marks

A school library in Lahore stores data about books.Table BOOKS:BookID | Title | Genre | Pages | Price | AvailableL101 | The Hidden Valley | Fiction | 312 | 1450 | YL102 | Atoms and Us | Science | 228 | 1890 | YL103 | Silk Road Tales | History | 410 | 2100 | NL104 | Coding for Teens | Science | 196 | 1350 | YL105 | Monsoon Days | Fiction | 254 | 980 | YL106 | Stars Above Thar | Science | 340 | 1200 | NL107 | Indus Cities | History | 288 | 1750 | YL108 | The Last Kite | Fiction | 176 | 850 | NL109 | Plant Power | Science | 150 | 990 | YL110 | Mughal Gardens | History | 365 | 2450 | YL111 | City of Lights | Fiction | 402 | 1600 | YL112 | Weather Watchers | Science | 268 | 1499 | Y(Price is in rupees. Available is a Boolean field: Y = Yes, N = No.)

  1. (a) Write the criteria needed to select books that are Fiction, are available, and have more than 250 pages. [3]
  2. (b) List the BookIDs of the records selected. [2]
Show answer
  1. (a) Genre = "Fiction" AND Available = Yes AND Pages > 250.
    1 mark each: Genre = "Fiction" | Available = Yes/True | Pages > 250 (not >=). All on one criteria row (AND).
  2. (b) L101, L105, L111 (3 records).
    2 marks for all correct and no extras; 1 mark if one error. L108 is excluded because it is not available and has fewer than 250 pages; L101, L105 and L111 meet all three conditions.
Q15Databases vs other methods · Standard · Paper 2 style · 5 marks

A school library in Lahore stores data about books.Table BOOKS:BookID | Title | Genre | Pages | Price | AvailableL101 | The Hidden Valley | Fiction | 312 | 1450 | YL102 | Atoms and Us | Science | 228 | 1890 | YL103 | Silk Road Tales | History | 410 | 2100 | NL104 | Coding for Teens | Science | 196 | 1350 | YL105 | Monsoon Days | Fiction | 254 | 980 | YL106 | Stars Above Thar | Science | 340 | 1200 | NL107 | Indus Cities | History | 288 | 1750 | YL108 | The Last Kite | Fiction | 176 | 850 | NL109 | Plant Power | Science | 150 | 990 | YL110 | Mughal Gardens | History | 365 | 2450 | YL111 | City of Lights | Fiction | 402 | 1600 | YL112 | Weather Watchers | Science | 268 | 1499 | Y(Price is in rupees. Available is a Boolean field: Y = Yes, N = No.)

  1. (a) The librarian wants a list of books that are either History books or cost less than Rs 1000. Explain how the criteria must be set up in the query so that both kinds of book are found. [2]
  2. (b) State how many records will be selected. [1]
  3. (c) Explain why using AND instead of OR would give a different result. [2]
Show answer
  1. (a) Put Genre = "History" on one criteria row and Price < 1000 on the next (OR) row, so a record is selected if it meets either condition.
    1 mark: Genre = "History" and Price < 1000 as the two conditions. 1 mark: on separate rows / joined with OR (not AND).
  2. (b) 6 (L103, L105, L107, L108, L109, L110).
    B1 6.
  3. (c) AND would select only books that are History AND cost under Rs 1000; no History book costs less than Rs 1000, so no records would be found.
    1 mark: AND needs both conditions true for the same record. 1 mark: no History book is under Rs 1000 so result would be empty / 0 records.
Q16Databases vs other methods · Standard · Paper 2 style · 6 marks

An electronics shop in Karachi stores online orders in this table.Table ORDERS:OrderID | Item | Quantity | UnitPriceK501 | USB cable | 6 | 450.0K502 | Wireless mouse | 2 | 1850.0K503 | Power bank | 1 | 4999.0K504 | Headphones | 3 | 3250.0K505 | Phone case | 10 | 375.5K506 | Webcam | 2 | 6200.0K507 | Memory card | 4 | 1299.0K508 | Keyboard | 1 | 2750.0(UnitPrice is in rupees.)

  1. (a) Write the formula for a calculated field called Total that multiplies Quantity by UnitPrice when the query is run. [2]
  2. (b) State the value of Total for orders K505 and K507, formatted as currency with 2 decimal places. [2]
  3. (c) Explain why Total is calculated at run-time rather than stored as a field in the table. [2]
Show answer
  1. (a) Total: [Quantity]*[UnitPrice]
    1 mark: field name Total (Total:). 1 mark: [Quantity]*[UnitPrice] with correct field names.
  2. (b) K505: Rs 3,755.00; K507: Rs 5,196.00.
    1 mark each: 10 × 375.50 and 4 × 1299.00.
  3. (c) It can always be worked out from Quantity and UnitPrice, so storing it wastes space, and if Quantity or UnitPrice changed the stored total could become wrong; calculating at run-time keeps it up to date.
    1 mark each for: avoids storing redundant data | always accurate/up to date if quantity or price changes.
Q17Databases vs other methods · Standard · Paper 2 style · 6 marks

An electronics shop in Karachi stores online orders in this table.Table ORDERS:OrderID | Item | Quantity | UnitPriceK501 | USB cable | 6 | 450.0K502 | Wireless mouse | 2 | 1850.0K503 | Power bank | 1 | 4999.0K504 | Headphones | 3 | 3250.0K505 | Phone case | 10 | 375.5K506 | Webcam | 2 | 6200.0K507 | Memory card | 4 | 1299.0K508 | Keyboard | 1 | 2750.0(UnitPrice is in rupees.)During a sale, every unit price is reduced by 12%.

  1. (a) Write the formula for a calculated field called SalePrice that gives the reduced unit price. [2]
  2. (b) Calculate SalePrice for the Power bank and for the Webcam, correct to 2 decimal places. [2]
  3. (c) The SalePrice field must be displayed as currency with 2 decimal places. Explain why this formatting does not change the stored value used in later calculations. [2]
Show answer
  1. (a) SalePrice: [UnitPrice]*0.88 (or [UnitPrice]-[UnitPrice]*0.12, or [UnitPrice]*(1-12/100))
    1 mark: field name SalePrice:. 1 mark: correct expression using [UnitPrice] and 0.88 or equivalent.
  2. (b) Power bank: Rs 4399.12; Webcam: Rs 5456.00.
    1 mark each: 4999 × 0.88 and 6200 × 0.88.
  3. (c) Formatting only changes how the value is displayed; the software keeps the full calculated value internally, so later calculations use the unrounded number (to change the value itself a rounding function would be needed).
    1 mark: format affects display only. 1 mark: the full-precision value is kept/used; use ROUND to change the actual value.
Q18Databases vs other methods · Standard · Paper 2 style · 5 marks

A gym in Islamabad stores data about its members.Table MEMBERS:MemberID | FirstName | LastName | Email | JoinDate | PlanG01 | Sadia | Malik | sadia.m@mailbox.pk | 14/02/2025 | GoldG02 | Ahmed | Siddiqui | ahmed77@webpost.com | 03/06/2025 | SilverG03 | Saba | Qureshi | saba.q@mailbox.pk | 21/09/2025 | GoldG04 | Tariq | Saleem | tsaleem@quicknet.org | 11/11/2025 | BronzeG05 | Hina | Shah | hina.shah@webpost.com | 05/01/2026 | SilverG06 | Kamran | Butt | kbutt@mailbox.pk | 28/01/2026 | GoldG07 | Sameer | Raza | sameer.r@quicknet.org | 17/02/2026 | BronzeG08 | Noor | Sultan | noor.s@mailbox.pk | 09/03/2026 | SilverG09 | Ali | Hassan | ali.h@webpost.com | 30/04/2026 | GoldG10 | Mehwish | Iqbal | mehwish.i@mailbox.pk | 22/05/2026 | Bronze(JoinDate is a date field in dd/mm/yyyy format.)

  1. (a) Write criteria to find Gold plan members whose email address ends in @mailbox.pk. [2]
  2. (b) List the MemberIDs found. [2]
  3. (c) Explain why the criterion "@mailbox.pk" without wildcards finds no records. [1]
Show answer
  1. (a) Email: Like "*@mailbox.pk"; Plan: = "Gold" (on the same criteria row).
    1 mark: Like "*@mailbox.pk" (wildcard before). 1 mark: Plan = "Gold" on same row (AND).
  2. (b) G01, G03, G06.
    2 marks all correct; 1 mark one error. G08 and G10 use mailbox.pk but are not Gold.
  3. (c) Without a wildcard the field must match exactly, and no email address is only "@mailbox.pk".
    B1.
Q19Databases vs other methods · Standard · Paper 2 style · 6 marks

A gym in Islamabad stores data about its members.Table MEMBERS:MemberID | FirstName | LastName | Email | JoinDate | PlanG01 | Sadia | Malik | sadia.m@mailbox.pk | 14/02/2025 | GoldG02 | Ahmed | Siddiqui | ahmed77@webpost.com | 03/06/2025 | SilverG03 | Saba | Qureshi | saba.q@mailbox.pk | 21/09/2025 | GoldG04 | Tariq | Saleem | tsaleem@quicknet.org | 11/11/2025 | BronzeG05 | Hina | Shah | hina.shah@webpost.com | 05/01/2026 | SilverG06 | Kamran | Butt | kbutt@mailbox.pk | 28/01/2026 | GoldG07 | Sameer | Raza | sameer.r@quicknet.org | 17/02/2026 | BronzeG08 | Noor | Sultan | noor.s@mailbox.pk | 09/03/2026 | SilverG09 | Ali | Hassan | ali.h@webpost.com | 30/04/2026 | GoldG10 | Mehwish | Iqbal | mehwish.i@mailbox.pk | 22/05/2026 | Bronze(JoinDate is a date field in dd/mm/yyyy format.)

  1. (a) Write the criterion for JoinDate to find members who joined between 1 January 2026 and 31 March 2026 inclusive. [2]
  2. (b) List the MemberIDs found. [2]
  3. (c) Explain why JoinDate must be set as a date field and not a text field for this search to work correctly. [2]
Show answer
  1. (a) >=01/01/2026 AND <=31/03/2026 (or Between 01/01/2026 And 31/03/2026).
    1 mark: >= start date. 1 mark: <= end date joined by AND (inclusive).
  2. (b) G05, G06, G07, G08.
    2 marks all correct; 1 mark one error.
  3. (c) In a text field dates are compared character by character (e.g. "09/03/2026" < "14/02/2025"), so ranges give wrong results; a date field compares actual dates in time order.
    1 mark: text compared alphabetically/character by character. 1 mark: date type compares chronologically so range is correct.
Q20Databases vs other methods · Standard · Paper 2 style · 6 marks

A travel agent in Lahore imports a file of tour data. The fields are TourCode, Destination, Nights, PricePerPerson and Departure. The PricePerPerson values have up to two decimal places (e.g. 85999.50). The Nights values are whole numbers from 2 to 14.

  1. (a) State the data type and display format for PricePerPerson and for Nights. [4]
  2. (b) After importing, a new tour is added: TourCode SK14, Destination Skardu, Nights 5, PricePerPerson 64500, Departure 18/07/2026. Describe two checks to make after entering the record. [2]
Show answer
  1. (a) PricePerPerson: currency (or numeric decimal), displayed with 2 decimal places and the Rs symbol; Nights: numeric integer, 0 decimal places.
    1 mark each: PricePerPerson currency/decimal | 2 dp | Nights integer | 0 dp.
  2. (b) Proofread the record against the given data to make sure every character is correct (visual check); check that the price shows as Rs 64,500.00 and the date in the correct format, i.e. the field types accepted the data.
    1 mark each for any two of: visual check against source / proofread | check spelling/capitals of Skardu | check value shown with correct format (2 dp, currency) | check the record appears in correct position when sorted | check date entered as 18 July not 7 June.
Q21Databases vs other methods · Standard · Paper 2 style · 5 marks

A science club records data from weather stations for one week in June.Table STATIONS:StationID | Town | Altitude_m | MeanTemp_C | RainDaysS1 | Gilgit | 1500 | 18.2 | 4S2 | Karachi | 8 | 31.5 | 0S3 | Murree | 2291 | 14.8 | 12S4 | Multan | 122 | 34.1 | 1S5 | Quetta | 1680 | 22.6 | 2S6 | Skardu | 2228 | 16.9 | 3S7 | Lahore | 217 | 32.8 | 6S8 | Peshawar | 331 | 30.4 | 5

  1. (a) Write the criterion to select stations with an altitude greater than 1000 metres. [1]
  2. (b) State how many stations are selected and calculate their average MeanTemp_C, correct to 1 decimal place. [3]
  3. (c) The selected stations are sorted into ascending order of MeanTemp_C. State the Town that appears first. [1]
Show answer
  1. (a) >1000 in the Altitude_m field.
    B1.
  2. (b) 4 stations; average 18.1 °C.
    B1 4; M1 (18.2 + 14.8 + 22.6 + 16.9) ÷ 4; A1 18.1.
  3. (c) Murree.
    B1.
Q22Databases vs other methods · Challenge · Paper 1 style · 6 marks

A dental clinic in Hyderabad stores patient details and appointment history on paper record cards kept in filing cabinets. The owner is considering a computerised database.

  1. (a) Evaluate the use of a computerised database rather than paper record cards for the clinic. [6]
Show answer
  1. (a) A database lets staff search for a patient instantly, sort and produce reports such as all appointments for tomorrow, uses validation to reduce errors, can be backed up and needs less physical space, and access can be restricted with passwords. However it costs money for hardware, software and training, needs electricity (load-shedding is a problem), data could be hacked or lost if not backed up, and data protection rules apply. Conclusion: the database is better in the long term if backups and security are in place.
    Max 4 marks for one side; 1–2 marks for reasoned conclusion. Benefits: faster searching | easy sorting/queries/reports | validation reduces errors | backups possible – cards can be lost/destroyed by fire | less storage space | several staff can access at once | easier to update | password-protected. Drawbacks: initial cost of hardware/software | staff training | data entry of existing cards takes time | power cuts/system failure stop access | hacking/malware risk | must comply with data protection.
Q23Databases vs other methods · Challenge · Paper 1 style · 5 marks

A school stores data about students and the clubs they join. A student can join many clubs and each club has many students. The designer proposes three tables: STUDENT (StudentID, Name, Class), CLUB (ClubID, ClubName, Teacher) and MEMBERSHIP (StudentID, ClubID, DateJoined).

  1. (a) Explain why the MEMBERSHIP table is needed. [3]
  2. (b) Explain why StudentID alone cannot be the primary key of MEMBERSHIP, and suggest a suitable primary key. [2]
Show answer
  1. (a) The relationship between students and clubs is many-to-many, which cannot be linked directly. MEMBERSHIP holds one record for each student joining each club, linking StudentID and ClubID, so it turns the relationship into two one-to-many relationships (STUDENT to MEMBERSHIP and CLUB to MEMBERSHIP) without repeating student or club details.
    1 mark each for any three of: relationship is many-to-many | cannot be stored directly without repeating data | MEMBERSHIP has one record per student per club | contains StudentID and ClubID as foreign keys | creates two one-to-many relationships | stores data about the joining (DateJoined).
  2. (b) A student who joins several clubs appears in several records, so StudentID is not unique; a composite key of StudentID and ClubID together (or a new MembershipID field) is unique.
    1 mark: StudentID repeated – not unique. 1 mark: StudentID + ClubID combined (composite key) or a new unique MembershipID.
Q24Databases vs other methods · Challenge · Paper 2 style · 6 marks

A school library in Lahore stores data about books.Table BOOKS:BookID | Title | Genre | Pages | Price | AvailableL101 | The Hidden Valley | Fiction | 312 | 1450 | YL102 | Atoms and Us | Science | 228 | 1890 | YL103 | Silk Road Tales | History | 410 | 2100 | NL104 | Coding for Teens | Science | 196 | 1350 | YL105 | Monsoon Days | Fiction | 254 | 980 | YL106 | Stars Above Thar | Science | 340 | 1200 | NL107 | Indus Cities | History | 288 | 1750 | YL108 | The Last Kite | Fiction | 176 | 850 | NL109 | Plant Power | Science | 150 | 990 | YL110 | Mughal Gardens | History | 365 | 2450 | YL111 | City of Lights | Fiction | 402 | 1600 | YL112 | Weather Watchers | Science | 268 | 1499 | Y(Price is in rupees. Available is a Boolean field: Y = Yes, N = No.)

  1. (a) Write the criteria to select books that are NOT Fiction, are available, and have a price from Rs 1000 to Rs 2000 inclusive. [3]
  2. (b) List the BookIDs selected. [2]
  3. (c) The results must be sorted into descending order of Price. State which record appears first. [1]
Show answer
  1. (a) Genre: NOT "Fiction" (or <> "Fiction"); Available: Yes; Price: >=1000 AND <=2000 (or Between 1000 And 2000).
    1 mark each: Genre NOT/<> "Fiction" | Available = Yes | Price >=1000 AND <=2000 (inclusive).
  2. (b) L102, L104, L107, L112 (4 records).
    2 marks all correct; 1 mark one error. L106 fails Available; L109 fails price (990); L110 fails price (2450); L103 fails Available and price.
  3. (c) L102 (Rs 1890).
    B1.
Q25Databases vs other methods · Challenge · Paper 2 style · 5 marks

An electronics shop in Karachi stores online orders in this table.Table ORDERS:OrderID | Item | Quantity | UnitPriceK501 | USB cable | 6 | 450.0K502 | Wireless mouse | 2 | 1850.0K503 | Power bank | 1 | 4999.0K504 | Headphones | 3 | 3250.0K505 | Phone case | 10 | 375.5K506 | Webcam | 2 | 6200.0K507 | Memory card | 4 | 1299.0K508 | Keyboard | 1 | 2750.0(UnitPrice is in rupees.)

  1. (a) A query uses the calculated field Total: [Quantity]*[UnitPrice]. Write the criterion to show only orders with a Total of more than Rs 6000. [1]
  2. (b) List the OrderIDs that the query displays and give the Total for each. [3]
  3. (c) The manager wants the results sorted so that the largest Total is first. State the OrderID of the first record. [1]
Show answer
  1. (a) >6000 entered in the criteria row of the Total calculated field.
    B1 >6000 under Total.
  2. (b) K504: Rs 9,750.00; K506: Rs 12,400.00.
    3 marks all correct with totals; 2 marks one error; 1 mark two errors. K503 (4999.00) and K502 (3700.00) are not shown.
  3. (c) K506.
    B1.
Q26Databases vs other methods · Challenge · Paper 2 style · 5 marks

An electronics shop in Karachi stores online orders in this table.Table ORDERS:OrderID | Item | Quantity | UnitPriceK501 | USB cable | 6 | 450.0K502 | Wireless mouse | 2 | 1850.0K503 | Power bank | 1 | 4999.0K504 | Headphones | 3 | 3250.0K505 | Phone case | 10 | 375.5K506 | Webcam | 2 | 6200.0K507 | Memory card | 4 | 1299.0K508 | Keyboard | 1 | 2750.0(UnitPrice is in rupees.)

  1. (a) A report shows every order with its calculated Total. At the bottom of the report the manager wants the average Total of all orders. Describe how to add this summary to the report. [2]
  2. (b) Calculate the average Total, correct to 2 decimal places. [2]
  3. (c) State how many orders have a Quantity of 3 or more. [1]
Show answer
  1. (a) In the report footer, add a text box (control) containing =Avg([Total]) (an average function on the calculated field), and format it as currency with 2 decimal places.
    1 mark: place in the report footer (not the page footer). 1 mark: =Avg([Total]) / average of Total, formatted as currency 2 dp.
  2. (b) Rs 5,656.25
    M1 sum of totals = 45250.00; A1 ÷ 8 = 5656.25.
  3. (c) 4.
    B1.
Q27Databases vs other methods · Challenge · Paper 2 style · 7 marks

A gym in Islamabad stores data about its members.Table MEMBERS:MemberID | FirstName | LastName | Email | JoinDate | PlanG01 | Sadia | Malik | sadia.m@mailbox.pk | 14/02/2025 | GoldG02 | Ahmed | Siddiqui | ahmed77@webpost.com | 03/06/2025 | SilverG03 | Saba | Qureshi | saba.q@mailbox.pk | 21/09/2025 | GoldG04 | Tariq | Saleem | tsaleem@quicknet.org | 11/11/2025 | BronzeG05 | Hina | Shah | hina.shah@webpost.com | 05/01/2026 | SilverG06 | Kamran | Butt | kbutt@mailbox.pk | 28/01/2026 | GoldG07 | Sameer | Raza | sameer.r@quicknet.org | 17/02/2026 | BronzeG08 | Noor | Sultan | noor.s@mailbox.pk | 09/03/2026 | SilverG09 | Ali | Hassan | ali.h@webpost.com | 30/04/2026 | GoldG10 | Mehwish | Iqbal | mehwish.i@mailbox.pk | 22/05/2026 | Bronze(JoinDate is a date field in dd/mm/yyyy format.)

  1. (a) The manager wants a summary showing the number of members on each Plan. Describe how a summary query could produce this. [2]
  2. (b) State the count for each Plan. [3]
  3. (c) Gold costs Rs 6000 per month, Silver Rs 4500 and Bronze Rs 3000. Calculate the total monthly income from all members. [2]
Show answer
  1. (a) Create a query containing the Plan field and MemberID; turn on Totals; set Plan to Group By and MemberID to Count.
    1 mark: group by Plan. 1 mark: Count of MemberID (totals/summary row).
  2. (b) Gold 4, Silver 3, Bronze 3.
    1 mark each.
  3. (c) Rs 46,500
    M1 4×6000 + 3×4500 + 3×3000; A1.
Q28Databases vs other methods · Challenge · Paper 2 style · 6 marks

An online bakery has two tables.Table CUSTOMER:CustID | Name | CityC1 | Bushra Aziz | LahoreC2 | Faisal Rana | MultanC3 | Rabia Noor | LahoreC4 | Daniyal Akram | QuettaTable SALE:SaleID | CustID | AmountT01 | C1 | 3200T02 | C3 | 1500T03 | C2 | 4100T04 | C1 | 2750T05 | C4 | 900T06 | C3 | 5600T07 | C1 | 1250(Amount is in rupees.)

  1. (a) Describe how to create the relationship between the two tables, including the type of relationship. [3]
  2. (b) A query uses both tables and selects sales where City = "Lahore". State how many sales are found and their total amount. [2]
  3. (c) Explain why this query could not be done using the SALE table alone. [1]
Show answer
  1. (a) Link CustID in CUSTOMER (primary key) to CustID in SALE (foreign key); it is a one-to-many relationship because one customer can make many sales; enforce referential integrity.
    1 mark: link on CustID. 1 mark: CUSTOMER.CustID primary key → SALE.CustID foreign key. 1 mark: one-to-many (one customer, many sales).
  2. (b) 5 sales; total Rs 14,300.
    1 mark: 5 (T01, T02, T04, T06, T07). 1 mark: Rs 14300.
  3. (c) SALE does not contain the City field; the city is only in CUSTOMER, so the tables must be joined through CustID.
    B1.
Q29Databases vs other methods · Challenge · Paper 2 style · 6 marks

A student designed a query on a table of laptops (fields: Model, Brand, RAM_GB, Price, InStock). The task was: 'Select laptops made by Brand A or Brand B that have at least 8 GB of RAM and are in stock.' The student set these criteria:Row 1: Brand = "Brand A", RAM_GB > 8, InStock = YesRow 2: Brand = "Brand B"

  1. (a) Identify two errors in the student's criteria and explain the effect of each. [4]
  2. (b) Write the corrected criteria. [2]
Show answer
  1. (a) Error 1: RAM_GB > 8 should be >= 8 – laptops with exactly 8 GB of RAM are wrongly excluded. Error 2: the RAM and InStock criteria are missing from row 2 – every Brand B laptop is selected, even those with less than 8 GB RAM or out of stock.
    1 mark for each error identified + 1 mark for each effect: > instead of >= excludes 8 GB laptops | row 2 has only Brand so all Brand B laptops are shown regardless of RAM/stock.
  2. (b) Row 1: Brand = "Brand A", RAM_GB >= 8, InStock = YesRow 2: Brand = "Brand B", RAM_GB >= 8, InStock = Yes(or Brand: "Brand A" OR "Brand B" with RAM_GB >= 8 AND InStock = Yes on one row)
    1 mark: >= 8 on both rows. 1 mark: InStock = Yes repeated on row 2 / single row with Brand A OR Brand B.
Q30Databases vs other methods · Challenge · Paper 2 style · 7 marks

A restaurant in Faisalabad stores weekly staff data. HourlyRate is in rupees.Table STAFF:StaffID | Name | HoursWorked | HourlyRateE1 | Rizwan | 42 | 650E2 | Asma | 38 | 720E3 | Jawad | 45 | 600E4 | Laiba | 30 | 800E5 | Fahad | 40 | 680

  1. (a) Write a calculated field called WeeklyPay. [2]
  2. (b) Calculate WeeklyPay for each member of staff. [3]
  3. (c) State the StaffIDs shown if the criterion >27000 is added to WeeklyPay, and the total WeeklyPay of these staff. [2]
Show answer
  1. (a) WeeklyPay: [HoursWorked]*[HourlyRate]
    1 mark: name WeeklyPay:. 1 mark: expression.
  2. (b) Rizwan Rs 27,300; Asma Rs 27,360; Jawad Rs 27,000; Laiba Rs 24,000; Fahad Rs 27,200.
    3 marks all five correct; 2 marks four; 1 mark three.
  3. (c) E1, E2, E5; total Rs 81,860.
    1 mark IDs; 1 mark total.

Similar questions

Questions that test the same subtopic in different years, grouped so you can work on one skill at a time.

References only: find each question in its paper (official link where available, otherwise through your school).

Databases vs other methods Rare2 questions · 2/9 sessions

Subtopics

Our analysis of how often each subtopic was examined and how many marks it carried, 2022 to May/June 2026.

SubtopicMarks indexedSessions
Databases vs other methods Rare82/9

← All ICT topics