Search Header Logo
N5 Revision DBB

N5 Revision DBB

Assessment

Presentation

Computers

12th Grade

Practice Problem

Medium

Created by

E Reavey

Used 2+ times

FREE Resource

7 Slides • 24 Questions

1

media

N5 Computing

Exam Revsion 2

2

Analysis

At the analysis stage of developing a database, you must identify end-user and functional requirements

End-user requirements describe tasks that a user of the database would want to carry out

Functional requirements describe what must be created or coded in the database

3

Multiple Choice

Is the following is an end-user requirement or a functional requirement?

The database must be able to produce a list of all S4 pupils in alphabetical order of surname

1

End User Requirement

2

Functional Requirement

4

Multiple Choice

Is the following is an end-user requirement or a functional requirement?

Different tables are required to store details of all subjects, sets, classes and pupils

1

End User Requirement

2

Functional Requirement

5

Multiple Choice

Is the following is an end-user requirement or a functional requirement?

When a new pupil joins the school, all of their details and subjects must be added to the timetable

1

End User Requirement

2

Functional Requirement

6

Design

Two tools/tasks from the design stage are:

  • Data Dictionary - to describe all the attributes to be created in each entity

  • Entity-Relationship Diagram - to show the connection and relationship between two entities joined with a primary and foreign key

7

Multiple Choice

Attribute types

There are five attribute types we need to know for data stored in a database field

Which of the following is not attribute type?

1

Number

2

Time

3

Integer

4

Boolean

5

Date

8

Multiple Choice

Validation checks

There are 4 types of validation check, used to make sure data entered in a database field is sensible and allowable

Which validation check is this an example of?

Data must be a number between 1 and 6

1

Presence check

2

Length check

3

Range check

4

Restricted choice

9

Multiple Choice

Validation checks

There are 4 types of validation check, used to make sure data entered in a database field is sensible and allowable

Which validation check is this an example of?

A username must be 10 characters long

1

Presence check

2

Length check

3

Range check

4

Restricted choice

10

Multiple Choice

Validation checks

There are 4 types of validation check, used to make sure data entered in a database field is sensible and allowable

Which validation check is this an example of?

House must be one of G, L, O or X

1

Presence check

2

Length check

3

Range check

4

Restricted choice

11

Multiple Choice

Validation checks

There are 4 types of validation check, used to make sure data entered in a database field is sensible and allowable

Which validation check is this an example of?

You cannot leave the date of birth field blank

1

Presence check

2

Length check

3

Range check

4

Restricted choice

12

Database Entities/Tables

Data in a database file is organised into entities/tables to store related information

An entity/table is made up of multiple attributes/fields to store a single item of information

You can add records to the table storing information about one person or thing

Each table must have a primary key, a unique identifier for each record in a table

A database may have more than one table and the tables can be linked together using a foreign key

13

Database Entities/Tables

Data in a database file is organised into entities/tables to store related information

An entity/table is made up of multiple attributes/fields to store a single item of information

You can add records to the table storing information about one person or thing

Each table must have a primary key, a unique identifier for each record in a table

A database may have more than one table and the tables can be linked together using a foreign key

14

media

You identify the attributes to be stored for each entity in a data dictionary

Indicate primary or foreign keys using the notation PK or FK

Always indicate Yes or No in the required column

Show the criteria of the validation rules 

Data Dictionaries

15

Draw

Identify the foreign key

16

media

Show entities as a rectangle and attributes as ovals, underline PK, star (*) foreign key, show one to many relationship, add a word to describe the relationship

E-R Diagrams

17

Multiple Choice

Question image

What is the relationship between the entities?

1

One patient can go to one doctor

2

One patient can go to many doctors

3

One doctor has one patient

4

One doctor has many patients

18

Multiple Choice

Question image

What is the primary to foreign key relationship?

1

Department.DepartmentCode = Staff.DepartmentCode

2

Doctor.StaffID = Patient.StaffID

3

Doctor.StaffID = Patient.PatientID

4

Doctor.DateJoined = Doctor.DateRegistered

19

Multiple Choice

Question image

What is the relationship between the entities?

1

One department employs many staff

2

One employee is employed by many departments

3

One employee is employed by one department

4

Many departments employ many staff

20

Multiple Choice

Question image

What is the primary to foreign key relationship?

1

Department.DepartmentCode = Staff.DepartmentCode

2

Department.Department = Staff.Staff

3

Department.DepartmentCode = Staff.StaffIDNumber

4

Department.DeptName = Staff.StaffName

21

Multiple Choice

Question image

What is the primary key in the Pupil table?

1

pupilID

2

schoolName

3

surname

4

schoolID

22

Multiple Choice

Question image

What is the primary key in the School table?

1

schoolID

2

schoolName

23

Multiple Choice

Question image

What is the foreign key and in which table does it appear?

1

pupilID in Pupil table

2

forename in Pupil table

3

schoolID in Pupil table

4

schoolID in School table

5

schoolName in School table

24

Open Ended

Question image

What would be the result of this query?

SELECT forename FROM Pupil WHERE pupilID = 'S0004';

25

Open Ended

Question image

What would be the result of this query?

SELECT forename FROM Pupil WHERE surname = 'Smith';

26

Open Ended

Question image

What would be the result of this query?

SELECT forename FROM Pupil, School WHERE School.schoolID = Pupil.schoolID AND schoolName = 'Kirk Lane Junior School';

27

Open Ended

Question image

What would be the result of this query?

INSERT INTO Pupil (pupilID, forename, surname, schoolID) VALUES ('S0006', 'Emma', 'Jones', 'P0018');

28

Open Ended

Question image

What would be the result of this query?

UPDATE Pupil SET schoolID = 'P0018' WHERE schoolID = 'P0011';

29

Open Ended

Question image

What would be the result of this query?

DELETE FROM School WHERE schoolID = 'P0011';

30

Open Ended

Question image

Referential Integrity

Describe the problem in the tables below.

31

Open Ended

Question image

Sorting

How has the Pupil table been sorted?

media

N5 Computing

Exam Revsion 2

Show answer

Auto Play

Slide 1 / 31

SLIDE