First 50 of 199 questions. Each one lists the choices, the correct answer, and an explanation. The checker at the top of this page saves progress in this browser when it is available.
Continue in the practice tool above to load more questions, 50 at a time.
Question 1Database concepts
Which statement best describes a relational database?
- A single flat file holding all records in one long list
- A collection of related data organised into tables with rows and columns Correct answer.
- A folder of documents stored on a shared network drive
- A program that performs calculations on spreadsheets
Explanation
A relational database stores data in tables (relations) made up of rows (records) and columns (fields), and the tables can be linked through shared key values. The relational model is defined by this tabular structure and the relationships between tables.
Question 2Database concepts
In a database table, what does a record represent?
- A single column of values of the same type
- The definition of the table's structure only
- One complete set of related field values about a single entity Correct answer.
- A saved query that retrieves rows
Explanation
A record (row) holds all the field values describing one entity, such as one customer or one order. A field (column) holds one attribute across many records.
Question 3Database concepts
Which data type is most appropriate for storing a person's date of birth?
- Date/Time Correct answer.
- Boolean
- Currency
- Text
Explanation
A Date/Time type stores calendar dates so they can be validated, sorted chronologically and used in date calculations. Text would allow inconsistent formats and would not sort correctly.
Question 4Database concepts
What is the primary purpose of a primary key in a table?
- To link the table to an external spreadsheet
- To sort the records automatically into alphabetical order
- To hide sensitive fields from users
- To uniquely identify each record in the table Correct answer.
Explanation
A primary key is a field (or combination of fields) whose value is unique for every record and is never null, so each record can be identified unambiguously. Sorting, linking and security are handled by other features.
Question 5Database concepts
A table stores customers and another stores orders. Which field would typically be the foreign key in the orders table?
- The order total
- The customer identifier Correct answer.
- The order date
- The order identifier
Explanation
A foreign key is a field in one table that holds the primary key value of a related table, creating the link. Storing the customer identifier in the orders table ties each order to its customer.
Question 6Database concepts
What does a one-to-many relationship between Customers and Orders mean?
- Each order can have many customers, but each customer has one order
- Each customer has exactly one order and each order has one customer
- Each customer can have many orders, but each order belongs to one customer Correct answer.
- Customers and orders are unrelated tables
Explanation
In a one-to-many relationship, one record in the first table can be associated with many records in the second, while each record in the second table relates to only one record in the first.
Question 7Database concepts
Which of these is an advantage of storing data in a database rather than in separate spreadsheets?
- Data is automatically converted into charts
- Each user can edit files without any restrictions
- Records can only be entered by a database administrator
- Duplication of data is reduced through central storage Correct answer.
Explanation
A database centralises data so that it is stored once and shared, which reduces redundancy and the inconsistency that arises when copies drift apart. Charts, access control and entry rights are separate features.
Question 8Database concepts
What is a database management system (DBMS)?
- A printed report generated from stored records
- Software used to create, maintain and query a database Correct answer.
- The physical hard disk on which database files are saved
- A set of rules for drawing entity diagrams
Explanation
A DBMS is the software layer that lets users and applications define, store, retrieve, update and secure data in a database. The storage hardware and the data itself are separate from the software.
Question 9Database concepts
A table of library loans must ensure that the same book cannot be recorded as on loan to two members at the same time. Which approach best enforces this?
- Apply a validation rule limiting the loan period to 14 days
- Make the book identifier unique among active loans Correct answer.
- Create a query that lists all current loans
- Sort the loans table by book identifier
Explanation
Uniqueness of the book identifier among active loans is an integrity constraint that the database enforces on entry, preventing duplicate active loans for the same book. Validation of loan length and queries do not prevent duplicates.
Question 10Database concepts
Referential integrity in a relational database means that:
- Every record must have a value in every field
- Only one user may edit a table at a time
- A foreign key value must match an existing primary key value in the related table Correct answer.
- Every table must contain at least one numeric field
Explanation
Referential integrity ensures that a foreign key always points to a valid existing record, so records cannot reference parents that do not exist. It does not require numeric fields or fully populated rows.
Question 11Database concepts
Which statement about a candidate key is correct?
- It is any field that can uniquely identify a record and may become the primary key Correct answer.
- It is always composed of two or more fields
- It is a field that links two tables together
- It is a field that may contain duplicate values
Explanation
A candidate key is any minimal set of fields with unique values for every record; one candidate key is chosen as the primary key and the others remain alternate keys. It need not be composite and is not necessarily a linking field.
Question 12Database concepts
A database designer splits a large table into separate Customer and Order tables. Which benefit does this normalisation mainly provide?
- Reduced redundant data and fewer update anomalies Correct answer.
- Larger storage capacity on the server
- Automatic encryption of sensitive fields
- Faster printing of reports
Explanation
Normalisation structures data so each fact is stored once, which removes redundancy and prevents insertion, update and deletion anomalies. Performance, security and capacity are separate concerns.
Question 13Database concepts
Which SQL clause is used to filter the rows returned by a query?
- WHERE Correct answer.
- GROUP BY
- ORDER BY
- HAVING
Explanation
The WHERE clause specifies a condition that each row must satisfy to be included in the result. ORDER BY sorts, GROUP BY aggregates and HAVING filters groups after aggregation.
Question 14Database concepts
What is the result of the query SELECT COUNT(*) FROM Students; ?
- The number of records in the Students table Correct answer.
- The sum of all numeric fields in the table
- A list of all student names
- The number of fields in the Students table
Explanation
COUNT(*) counts rows, so the query returns the total number of records in the table. It does not list values or count columns.
Question 15Database concepts
A query must return only customers whose city is 'Leeds' and whose balance is over 100. Which condition achieves this?
- City = 'Leeds' AND Balance < 100
- City = 'Leeds' OR Balance > 100
- City <> 'Leeds' AND Balance > 100
- City = 'Leeds' AND Balance > 100 Correct answer.
Explanation
Both conditions must hold at the same time, so they are joined with AND. Using OR would also return customers in other cities or with low balances.
Question 16Database concepts
A validation rule on a Quantity field states: Between 1 And 50. A user enters 0. What happens?
- The value is automatically changed to 1
- The value is rejected because it fails the rule Correct answer.
- The value is stored but flagged in a report
- The value is accepted because it is numeric
Explanation
A validation rule restricts accepted values at the point of entry, so a value outside the permitted range is rejected. Validation prevents invalid data from being stored rather than correcting it silently.
Question 17Database concepts
Which statement distinguishes validation from verification?
- Validation happens after storage; verification happens before storage
- Validation checks that data is sensible and within rules; verification checks that data was entered accurately Correct answer.
- Validation applies only to numbers; verification applies only to text
- Validation checks spelling; verification checks data types
Explanation
Validation tests whether entered data meets defined rules and is reasonable, while verification confirms that the data was copied or entered correctly, for example by double entry or visual checking.
Question 18Database concepts
In a table of employees, a field stores the department name in every employee record. This causes an update anomaly. Which change best removes the anomaly?
- Move department details into a separate Department table linked by a department identifier Correct answer.
- Increase the field length for department names
- Create a query that lists distinct department names
- Add an index to the department field
Explanation
Storing the department name repeatedly duplicates data, so renaming a department requires many updates and risks inconsistency. Placing departments in their own table and referencing them by key stores the name once.
Question 19Database concepts
Two tables are joined on CustomerID. One customer has no orders. Which join type returns every customer, including those without orders?
- Left outer join with Customers on the left Correct answer.
- Cross join
- Inner join
- Equi-join on OrderID
Explanation
An outer join preserves unmatched rows from the designated table, filling the other side with nulls. An inner join returns only rows with matches in both tables.
Question 20Database concepts
A table has a composite primary key made of OrderID and ProductID. What does this imply?
- Neither field may ever be repeated in the table
- The combination of OrderID and ProductID must be unique, but either field alone may repeat Correct answer.
- ProductID must be a foreign key in every other table
- OrderID alone must be unique across the table
Explanation
A composite key enforces uniqueness across the combination of its fields, allowing individual fields to repeat as long as no pair is duplicated. This suits a table linking orders to products.
Question 21Database concepts
A user reports that a query returns duplicate customer rows after joining Customers to Orders. Which explanation is most likely?
- The Customers table has no primary key defined
- The WHERE clause was omitted from the query
- The ORDER BY clause was placed after the WHERE clause
- The join matches one customer to several orders, producing one row per order Correct answer.
Explanation
A one-to-many join produces one result row for each matching child record, so a customer with several orders appears several times. Removing duplicates requires grouping or selecting distinct customers.
Question 22Database concepts
Which statement about NULL values in a relational database is correct?
- NULL means the value is unknown or not applicable and is not equal to any value Correct answer.
- NULL is equivalent to the number zero
- NULL is treated as an empty text string in comparisons
- NULL can be used as a primary key value
Explanation
NULL represents the absence of a value, so it is distinct from zero or an empty string and requires IS NULL for testing. Because a primary key must have a known unique value, NULL cannot serve as one.
Question 23Database concepts
Which of these is an example of a non-relational (NoSQL) database?
- A document store holding JSON-like records Correct answer.
- A table with a primary key and foreign keys
- A flat text file with comma-separated values
- A spreadsheet with named ranges
Explanation
Document stores are a category of NoSQL databases that hold flexible, self-describing records rather than fixed relational tables. Relational tables, spreadsheets and flat files are not NoSQL databases.
Question 24Database concepts
Why might an organisation use an input mask on a Postcode field?
- To force the entry into a consistent pattern of characters Correct answer.
- To sort records by postcode automatically
- To encrypt the stored postcode values
- To calculate the distance between addresses
Explanation
An input mask constrains the format of entered characters so values follow a consistent pattern, which improves accuracy and consistency. It does not encrypt, calculate or sort data.
Question 25Database concepts
A school stores each student's tutor group name in the student record, and also keeps a TutorGroups table listing each group once. What problem does this duplication create?
- The student table cannot have a primary key
- Queries can no longer sort by tutor group
- The TutorGroups table cannot store group names
- Renaming a tutor group requires updates in more than one place Correct answer.
Explanation
When the same fact is stored in two places, an update must be applied everywhere or the copies disagree, producing an update anomaly. Storing the group identifier only in the student record avoids this.
Question 26Database concepts
Which term describes a single row in a relational database table?
- Field
- Column
- Record Correct answer.
- Attribute
Explanation
In relational terminology a row is a record (or tuple) and holds one complete set of related values. A field, attribute or column describes one property shared by all rows.
Question 27Database concepts
What is the primary purpose of a data dictionary in a database system?
- To store backup copies of the tables at regular intervals
- To hold the passwords used by each database user
- To describe the structure, data types and constraints of each field Correct answer.
- To list every value currently stored in the largest table
Explanation
A data dictionary is metadata: it documents each table and field, its data type, size, keys and validation constraints. It does not contain the user data itself, nor credentials or backups.
Question 28Database concepts
Which characteristic best distinguishes a relational database from a flat file?
- Records cannot be sorted or filtered
- Each file can hold only one record
- All data must be typed in by hand
- Data is split across related tables linked by keys Correct answer.
Explanation
A relational database organises data into multiple tables that are connected through key fields, which reduces duplication and supports complex queries. A flat file keeps everything in one table with no key-based links.
Question 29Database concepts
A company wants each customer to have a unique, unchanging identifier that other tables can reference. Which field should it use as the primary key?
- CustomerName
- City
- CustomerID Correct answer.
- DateOfBirth
Explanation
A primary key must be unique for every record and should not change over time. A system-assigned identifier such as CustomerID meets both conditions, whereas names, cities and dates can repeat or be edited.
Question 30Database concepts
Why does a relational database normally avoid storing the same piece of data in more than one table?
- To prevent inconsistencies when the value is updated Correct answer.
- To make the database file smaller than a spreadsheet
- To allow the data to be edited without a DBMS
- To remove the need for any validation rules
Explanation
Duplicated data must be updated in several places, and if one copy is missed the database becomes inconsistent. Storing each fact once, linked by keys, keeps updates reliable and consistent.
Question 31Database concepts
Which relationship exists between a Students table and a Courses table when each student may enrol in many courses and each course may have many students?
- Hierarchical
- One-to-one
- Many-to-many Correct answer.
- One-to-many
Explanation
When records on both sides can be associated with multiple records on the other side, the relationship is many-to-many. In a relational database it is usually implemented with a junction table holding the keys of both tables.
Question 32Database concepts
A table stores OrderID, ProductID and Quantity, with OrderID and ProductID together forming the primary key. Which statement about this design is correct?
- Each order may contain only one product
- Each product may appear in only one order
- The same product may appear in several orders, but only once per order Correct answer.
- Quantity must be unique across the whole table
Explanation
A composite primary key of OrderID and ProductID guarantees that each combination of order and product is unique. The same product can therefore be ordered many times, but not twice on the same order.
Question 33Database concepts
What does a foreign key in an Orders table typically contain?
- The value of the primary key of the related Customer record Correct answer.
- The total number of orders placed by the customer
- A value generated randomly for each order
- A copy of every field from the Customers table
Explanation
A foreign key holds the primary key value of a record in another table, creating the link between the two tables. This is what allows related data to be retrieved without duplicating it.
Question 34Database concepts
A table of invoices must never contain an invoice with a customer ID that does not exist in the Customers table. Which feature enforces this?
- A foreign key constraint Correct answer.
- An input mask
- A default value
- A sort order
Explanation
A foreign key constraint restricts the values in the referencing field to those that exist in the referenced primary key. This is the mechanism that prevents orphan records.
Question 35Database concepts
Which statement about the role of a database administrator is accurate?
- The administrator writes all the data entry screens used by staff
- The administrator manages access rights, backups and performance of the database Correct answer.
- The administrator decides the business rules of the organisation
- The administrator designs every report requested by managers
Explanation
A database administrator is responsible for the technical operation of the database, including user permissions, backup and recovery, and tuning performance. Business rules and report requirements come from the organisation and its users.
Question 36Database concepts
Which data type is most appropriate for storing a telephone number such as 0113 496 0000?
- Integer
- Text Correct answer.
- Currency
- Boolean
Explanation
Telephone numbers are identifiers rather than quantities, and they may contain leading zeros, spaces or symbols. A text type preserves the exact characters and avoids unwanted arithmetic.
Question 37Database concepts
Which statement about a query is correct?
- A query changes the data type of the selected fields
- A query retrieves a subset of records that meet specified criteria Correct answer.
- A query permanently deletes records that fail the criteria
- A query can only be run on a single table
Explanation
A query is a request for data that returns the records and fields matching the given criteria, leaving the stored data unchanged. Queries can draw on several related tables at once.
Question 38Database concepts
A designer must choose between storing a student's age and storing the student's date of birth. Why is the date of birth the better choice?
- Dates cannot be validated in a database
- Age cannot be displayed in a report
- Age uses more storage space than a date
- Age becomes out of date, whereas the date of birth stays accurate Correct answer.
Explanation
A stored age is only correct on the day it is recorded and must be recalculated constantly. A date of birth is a permanent fact from which the current age can be derived whenever needed.
Question 39Database concepts
A database records each sale with a SalespersonID. A manager wants a list showing every salesperson, including those who have made no sales. Which approach is required?
- An outer join from Salespersons to Sales Correct answer.
- An inner join from Salespersons to Sales
- A filter that excludes blank SalespersonID values
- A sort of the Sales table by SalespersonID
Explanation
An inner join returns only rows that match in both tables, so salespeople with no sales would disappear. An outer join keeps all rows from the Salespersons table and fills unmatched sales fields with nulls.
Question 40Database concepts
A table contains a field for DepartmentName repeated on every employee record. A new department name must be typed into many rows whenever it changes. Which problem does this illustrate?
- An update anomaly caused by unnormalised data Correct answer.
- A referential integrity violation
- A validation failure on the department field
- A loss of the primary key
Explanation
Repeating the same fact in many rows means an update must be applied everywhere, and any missed row leaves contradictory data. Normalising the department into its own table linked by a key removes this update anomaly.
Question 41Tables and relationships
In a relational database, what is a table primarily used to store?
- The list of users permitted to open the file
- Data about a single type of entity, arranged in rows and columns Correct answer.
- The formatting rules applied to printed reports
- The backup schedule for the database server
Explanation
A table is the fundamental storage structure in a relational database, holding data about one kind of entity in rows (records) and columns (fields). Formatting, permissions and backup schedules are not data stored in tables.
Question 42Tables and relationships
What is a record in a database table?
- A rule that restricts the values in a field
- A saved query that filters rows
- One complete row of related data about a single item Correct answer.
- A single column heading shared by every row
Explanation
A record (row) holds all the field values that describe one item, such as one customer or one order. Columns hold one attribute across many records, and queries and validation rules are separate objects.
Question 43Tables and relationships
What is a field in a database table?
- A column that stores one attribute for every record Correct answer.
- A calculation performed when a report opens
- A group of related tables saved together
- A single row containing one item's data
Explanation
A field is a column in a table that stores one particular attribute, such as a surname or a price, for each record. Rows are records, and groups of tables or report calculations are other concepts.
Question 44Tables and relationships
Which data type is most appropriate for a field that will store a person's date of birth?
- Yes/No
- Date/Time Correct answer.
- Short text
- Currency
Explanation
A Date/Time data type stores calendar dates so they can be sorted chronologically and used in date calculations. Text would sort dates alphabetically, and Currency or Yes/No cannot hold a date value.
Question 45Tables and relationships
What is the purpose of a primary key in a table?
- To uniquely identify each record in the table Correct answer.
- To store the largest value found in any numeric field
- To sort the records automatically into alphabetical order
- To link the table to a printed report layout
Explanation
A primary key is a field (or combination of fields) whose value is unique for every record, so each row can be identified precisely. Sorting, storing maximum values and report layouts are unrelated to the primary key's role.
Question 46Tables and relationships
Which property must a field have to serve as a good primary key?
- It must accept null values in every record
- It must be the last field in the table design
- It must contain a different value for each record Correct answer.
- It must be the widest text field in the table
Explanation
Uniqueness is the essential property of a primary key: no two records may share the same key value. Nulls are not allowed in a primary key, and width or field position has no bearing on suitability.
Question 47Tables and relationships
In a relationship between two tables, what is a foreign key?
- A key that is copied into every table of the database
- A field in one table that holds the primary key value of a record in another table Correct answer.
- A key that encrypts the linked records
- A key that replaces the primary key after the table is saved
Explanation
A foreign key stores, in a child table, the primary key value of a related record in a parent table, which is how the relationship is physically represented. It does not encrypt data, appear in every table, or replace a primary key.
Question 48Tables and relationships
A table of Students and a table of Courses need to record which students are enrolled in which courses, and a student may take many courses while a course has many students. What is the standard way to model this?
- Add a foreign key to the Students table only
- Create a third table containing foreign keys to both Students and Courses Correct answer.
- Store a list of course names in a single text field in Students
- Merge the two tables into one table with all fields
Explanation
A many-to-many relationship is resolved with a junction (linking) table whose records pair a student key with a course key. A single foreign key or a comma-separated list cannot represent multiple pairings, and merging the tables would duplicate data badly.
Question 49Tables and relationships
What is referential integrity designed to prevent?
- Creating an order record that refers to a customer that does not exist Correct answer.
- Creating more than one table in a database
- Sorting records in descending order
- Storing text in a numeric field
Explanation
Referential integrity ensures that every foreign key value matches an existing primary key value in the related table, preventing orphan records. It does not govern data types, table counts or sort order.
Question 50Tables and relationships
In a one-to-many relationship with referential integrity enforced, what happens if a user tries to delete a parent record that still has related child records?
- The whole database is locked until the server restarts
- The parent record is deleted and the child records are left untouched
- The delete is blocked unless the child records are deleted or the rule allows cascading Correct answer.
- The child records are silently changed to refer to a different parent
Explanation
Enforcing referential integrity protects related child rows, so deleting a parent with dependants is refused unless cascading deletes are enabled or the children are removed first. Child records are never silently re-pointed, and an orphaned child would violate the rule.