Pack — 8 Databases

Question-and-answer mirror of Jigsaw. Every concept in Jigsaw appears here as a !question with a collapsible !success answer.

How marks are set

  • 9618 | — the highest mark tariff that concept has ever carried in a 9618 paper. Answer points = that tariff + 2 spare, newest mark scheme first, older ones filling the gaps.
  • 9608 | — same rule, using 9608 tariffs. Still inside the 9618 syllabus wording, but untested in the current series.
  • Inferred | — not tested in either series. Tariff estimated from how 9618 marks comparable questions.
  • SME | — from the Save My Exams notes. Tariff estimated the same way.

One bullet = one mark, unless the bullet begins … (an expansion of the point above it).

The shape of the question matters as much as the content

Databases is a whole question in every paper since 2021, and it is built the same way each time: a scenario → a set of table definitions → E-R diagram → terminology → normalisation → SQL. Work the parts in that order when you practise, because the later parts depend on reading the table definitions correctly in the first.


8.1 Database Concepts

8.1.1 Limitations of using a file-based approach

Question

A company stores its data using a file-based approach. Explain the benefits of using a relational database instead.

Question

Give one limitation of using a file-based approach to store the data and explain how a relational database addresses this limitation.

Question

Identify three advantages of a relational database compared to a file-based approach.

Question

Someone claims that a file-based approach is usually better than a relational database. Explain why they are incorrect.

Question

Describe three drawbacks of a file-based approach compared to a relational database.

Question

Give three limitations of using a file-based approach to store data.

Question

State what is meant by the term data redundancy.

Question

Other than data redundancy and inconsistency, explain three limitations of a file-based approach.

Question

A school stores each student’s tutor name and form room in a single STUDENT table. Explain why this causes problems and how a relational database solves them.


8.1.2 Features of a relational database that address those limitations

Question

Describe two ways in which a relational database addresses the limitations of a file-based approach.

Question

Describe the features of a relational database that address the limitations of a file-based system.

Question

Give three reasons why a programmer should use a relational database rather than a file-based approach.

Question

Explain how a relational database helps to reduce data redundancy.

Question

Explain what is meant by an ad hoc query, and why the ability to write one is a benefit of a relational database.


8.1.3 Terminology of the relational database model

Question

Give the definition of the terms field, entity and foreign key, using an example from the given database for each.

Question

Complete the table by writing a definition for each of the database terms: referential integrity, candidate key, tuple.

Question

State what is meant by the following terms in a relational database model: entity, primary key, referential integrity.

Question

Complete the table by writing the missing term or description for each database feature.

Question

Complete the table by defining each database term: entity, attribute.

Question

State what is meant by a candidate key in a relational database.

Question

State what is meant by a tuple. Give an example of a tuple from the table shown.

Question

Explain what is meant by referential integrity, and how it applies to the database given.

Question

Explain the reasons why referential integrity is important in a database.

Question

Describe the relationship between the two tables. Refer to the primary and foreign keys in your answer.

Question

Identify the relationship between the tables PERFORMANCE and SHOW.

Question

Identify each relationship between the database tables and explain how each relationship can be implemented in the normalised database.

Question

Complete the table by identifying two foreign keys and the database table where each is found.

Question

Identify two tables in the database that contain one or more foreign keys. Give one attribute that is a foreign key in each table.

Question

Identify one attribute in the table that could be a candidate key.

Question

Complete the table by writing the correct answer for each item.

Question

Tick one box in each row to identify whether each field is a primary key or a foreign key.

Question

Underline the attribute, or attributes, that form the primary key in each of the tables.

Question

Give one example of each of the following relationships from the database described: one-to-one, one-to-many, many-to-many.

Question

Tick one box to identify the relationship that cannot be directly implemented in a normalised relational database.

Question

Explain what is meant by indexing in a relational database, and give one benefit and one drawback.

Question

State what is meant by a secondary key and explain why one would be used.

Question

Define what is meant by a record and by a table in a relational database.

Question

Define each of the following: entity, tuple, attribute, primary key, foreign key, referential integrity.


8.1.4 Entity-relationship (E-R) diagrams

Question

Complete the entity-relationship (E-R) diagram for the database, using the table definitions given.

Question

Draw an entity-relationship (E-R) diagram for the database described.

Question

Complete the entity-relationship (E-R) diagram for the relational database.

Question

A company’s database is described in words. Draw an entity-relationship (E-R) diagram to document the design.

Question

A completed E-R diagram is shown. Write the table definitions it represents, identifying the primary and foreign keys.

Question

Explain what the crow’s foot notation on an E-R diagram shows.

Question

Explain what information an entity-relationship diagram gives about a database design.


8.1.5 The normalisation process

Question

Draw one line from each Normal Form to the most appropriate definition.

Question

Tick one box in each row to identify the appropriate stage for each task: 0NF to 1NF, 1NF to 2NF, 2NF to 3NF.

Question

The database is normalised and is in Third Normal Form (3NF). Describe the characteristics of a database in 3NF.

Question

The database table shown is not normalised. Explain how to modify the table to put it into First Normal Form (1NF).

Question

Explain the purpose of the table CHARACTER_ITEM in the database.

Question

Explain the reasons why the data in the table ORDER_ITEM cannot be stored in the table ORDER.

Question

The database is not in Third Normal Form (3NF). Explain how the database can be normalised to 3NF.

Question

Complete the statements describing the three stages of database normalisation by filling in the missing words.

Question

The database has been normalised to Third Normal Form (3NF). Define the three stages of database normalisation.

Question

Identify three reasons why the data in the table shown is not in First Normal Form (1NF).

Question

State why the table shown is not in First Normal Form (1NF).

Question

Explain why a database designer normalises a database.

Question

Describe First, Second and Third Normal Form, giving an example of a table that fails each one.


8.1.6 Explaining why a set of tables is, or is not, in 3NF

Question

Explain why the database WORKEXPERIENCE is in Third Normal Form (3NF).

Question

Tick one box to identify whether the database is in Third Normal Form (3NF) or not. Justify your choice using one or more examples from the database.

Question

Explain why the database is not in Third Normal Form (3NF). Refer to the tables in your answer. Do not attempt to normalise the tables.

Question

Explain why the SalesProducts table is not in Third Normal Form (3NF).

Question

The designer states that the database is in Third Normal Form (3NF). Tick one box to indicate whether this is true or false, then justify your choice.

Question

Give three reasons why the EMPLOYEES database is fully normalised.

Question

The table shown is not fully normalised. State the highest normal form it satisfies and explain why it fails the next one.

Question

Explain the difference between a partial key dependency and a transitive dependency.


8.1.7 Producing a normalised database design

Question

Create a 3-table design for this database, normalised to Third Normal Form (3NF). Give your design in the format TableName(PrimaryKey, Field1, Field2, …).

Question

Write a normalised database design for this database. All tables must be in 3NF. Use the field names given and underline the primary key fields.

Question

The table BATCH is not normalised. Normalise it, write the table definitions for your new tables, and identify any primary and foreign keys. Do not change or include the other tables.

Question

Describe the additional tables that will need to be included in the database and explain how these tables will be linked.

Question

Using the data given in the first-attempt table, show how these data are now stored in the revised table designs.

Question

Write the table definitions to give the database in Third Normal Form (3NF).

Question

A table of sample data is shown. Produce a normalised database design in 3NF from this data, identifying primary and foreign keys.

Question

Explain why the database design you have produced is in Third Normal Form.

Question

Describe the steps you would follow to produce a normalised database design from a written description.


8.2 Database Management Systems (DBMS)

8.2.1 Features provided by a DBMS

Question

Describe what is meant by the following DBMS features: data dictionary, logical schema.

Question

State what is meant by a data dictionary and give one example of an item typically found in a data dictionary.

Question

Describe the purpose and contents of the data dictionary in the DBMS.

Question

A database has a data dictionary. Give three items that are stored in a data dictionary.

Question

The data dictionary stores the attribute names, table names, foreign keys and primary keys. Identify three other items stored in a data dictionary.

Question

Describe what is meant by a logical schema.

Question

A DBMS has several features. Identify the feature that describes the relationship between data and its structure.

Question

State what is meant by data integrity and give one example of how this is implemented in a database.

Question

A DBMS supports data integrity. Explain how a DBMS supports data integrity.

Question

Give two ways that a DBMS can support data integrity.

Question

Describe two ways in which the DBMS can be used to ensure the security of the customer data.

Question

Identify two methods the DBMS can use to protect the data in the table USER from unauthorised access. Explain how each method protects the data.

Question

Authentication is one method a DBMS can use to improve the security of a database. Describe other methods a DBMS can use.

Question

Describe the ways in which access rights can be used to protect the data in the database from unauthorised access.

Question

Name and describe two security features provided by a DBMS.

Question

Name and describe two security measures that could be in place to protect the security of the data held in the DBMS.

Question

Describe two ways in which the Database Administrator (DBA) could use the DBMS software to ensure the security of the data.

Question

Describe three factors to consider when planning a backup procedure for the data. Justify your decisions.

Question

Draw a line to match each DBMS feature — data dictionary, data security, data integrity — with its description.

Question

Name and describe two levels of the schema of a database.

Question

State what DBMS stands for.

Question

Explain what is meant by data modelling as a feature of a DBMS.

Question

Explain why an organisation would buy a DBMS rather than write its own file-handling software.

Question

Describe how a Database Management System addresses the limitations of a file-based approach.


8.2.2 Software tools found within a DBMS

Question

Complete the table by writing down the missing names and descriptions of DBMS features and tools.

Question

Describe the purpose of a developer interface in a Database Management System (DBMS).

Question

The DBMS provides a developer interface. Explain how a database designer can make use of it.

Question

Describe the purpose of a query processor in a DBMS.

Question

Identify three tasks that can be performed using the DBMS developer interface.

Question

Describe, using examples, how a business can use the following DBMS tools: developer interface, query processor.

Question

Fill in the names of the missing software tools: a ______ allows a developer to extract data from a database; a ______ enables a developer to create user-friendly forms and reports.

Question

Describe the components of the query processor in a DBMS.

Question

Explain the difference between writing a query in SQL and using a query-by-example (QBE) tool.

Question

State the purpose of the developer interface and of the query processor.


8.3 Data Definition Language (DDL) and Data Manipulation Language (DML)

Where the marks actually are

Of the 39 pages in the 9618 DDL/DML Legend, 14 are DDL and 22 are DML. DML is the larger and more heavily examined half: SELECT … FROM … WHERE with a join and an aggregate appears in every series. DDL is narrower and far more predictable — CREATE DATABASE, CREATE TABLE with data types and a key, and ALTER TABLE … ADD.

8.3.1–8.3.2 DDL and DML as concepts

Question

Explain the difference between Data Definition Language (DDL) and Data Manipulation Language (DML).

Question

Tick one box in each row to show whether each SQL command belongs to DDL or DML.


8.3.3 SQL as the industry standard

Question

The SQL script should return the number of riders with the rider level beginner who have a lesson booked on 09/09/2023. There are four errors in the script. Identify and correct each error.

Question

State what SQL stands for and explain why it is useful that it is an industry standard.

Question

State what the following SQL script returns: SELECT CUSTOMER.Name, COUNT(OrderID) AS Total FROM CUSTOMER INNER JOIN ORDER ON CUSTOMER.CustomerID = ORDER.CustomerID WHERE Paid = FALSE GROUP BY CUSTOMER.CustomerID;


8.3.4 Writing SQL (DDL) statements

Question

Write a Structured Query Language (SQL) script to define the database called SHOP.

Question

Some example data from the table STAFF is shown. Write a Structured Query Language (SQL) script to define the table STAFF.

Question

Write an SQL script to define the table BATCH. Include constraints (restrictions) on the data that can be entered into each field where appropriate.

Question

The table shows sample data for the table REPAIR_PART. Write an SQL script to define it, including constraints where appropriate.

Question

Sample data for the table PERFORMANCE is shown. Write a Structured Query Language (SQL) script to define the table PERFORMANCE.

Question

The database only supports these data types: character, varchar, Boolean, integer, real, date, time. Write an SQL script to define the table BIRD_TYPE.

Question

Complete the following Data Definition Language (DDL) statement to define the table RENTAL.

Question

Write a Structured Query Language (SQL) script to add one field to the table CONTAINER to store the date of last inspection.

Question

Write an SQL script to include two new fields in CAMERA_DATA, to store the number of photographs currently on the camera and the date the camera was last used.

Question

Write DDL statements to include a field in the table PURCHASE to store the date of the order.

Question

The table EXAM_QUESTION has been created but the foreign key has not been linked. Write an SQL script to update EXAM_QUESTION and link the foreign key to EXAM.

Question

Explain what is meant by the NOT NULL constraint and why it would be applied to a field.

Question

State the DDL commands in the syllabus sub-set and the data types available for attributes.


8.3.5 Writing SQL (DML) scripts

Question

Write an SQL script to return only the ProductID, ProductName and ComplaintDetails for all products with a rating of 5 or less. The results need to be displayed in descending order of rating.

Question

Write an SQL script to return the number of containers stored in the database for the ship with the name Caledonia.

Question

Write an SQL script to return the total number of placements completed by the student with ID LDEA01 at the company with ID NEAM. The total should be given an appropriate name.

Question

Write an SQL script to return the total quantity of ice cream sold to the customer with the ID of 0034E in the year 2023.

Question

Write an SQL script to return the number of events that each player has completed.

Question

Write an SQL script to return the number of times each show is scheduled. The result needs to include the show name and a suitable field name for the number of times it is scheduled.

Question

Write an SQL script to return the customer name for each customer that has orders they have not collected. Include the number of orders each customer has not collected, with an appropriate title.

Question

Write an SQL script to output the customer ID, the customer’s name and the total cost of the customer’s orders that have not been paid. The output of the total cost must have an appropriate title.

Question

Write the SQL script to return the total quantity of items that the customer with the ID of HJ231 has ordered.

Question

Write the SQL script to return the total number of courses that have started after 9 September 2023. The value returned must have an appropriate field name.

Question

Write a Structured Query Language (SQL) script to return the names of all the horses that have the horse level intermediate or beginner.

Question

Complete the SQL script to return the total number of telescopes owned by the company whose ID begins with HW.

Question

Complete the SQL script to return the number of birds of each size seen by the person with the ID of J_123.

Question

A new product needs to be entered into the database. Write a Structured Query Language (SQL) script to enter the new product into the table PRODUCT.

Question

The character with the ID “0002” needs its level changed to 3 and its money changed to 10000.00. Write an SQL script to change the character’s data.

Question

Write a Structured Query Language (SQL) script to delete all placements that have been completed.

Question

Complete the DML statements to return the number of cars for sale in each shop.

Question

Write an SQL script to return the average cost of all the products, with an appropriate title.

Question

Write an SQL script to return all customers, sorted by town in ascending order and then by surname in ascending order.

Question

Explain what an INNER JOIN does in an SQL query.

Question

State the SQL commands used to query and to maintain the data in a database.