0% found this document useful (0 votes)
8 views

Computer Assignment for AS

Uploaded by

sumanbasnet80123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Computer Assignment for AS

Uploaded by

sumanbasnet80123
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

2

1 A database is designed to store data about students at a college and the subjects which they
study.

• All students are based in a tutor group.


• A tutor supervises all the students in their tutor group.
• Each subject has one subject teacher only.
• Students study a number of subjects.

This table StudentSubjects was a first attempt at the database design.

Table: StudentSubjects

StudentName TutorGroup Tutor Subject Level SubjectTeacher

Tom 6 SAN Physics A SAN

Chemistry A MEB

General Studies AS DIL

Joe 7 MEB Geography AS ROG

French AS HEN

Samir 6 SAN Computer Science A VAR

Chemistry A MEB

Maths A COR

General Studies A DIL

(a) (i) Explain why the table is not in First Normal Form (1NF).

[1]

(ii) Explain your answer by referring to the data.

[1]

© UCLES 2012 9608/01/SP/15


3

(b) The design is changed to:

Student (StudentName, TutorGroup, Tutor)


StudentSubjectChoices (StudentName, Subject, Level, SubjectTeacher)

Using the data given in the first attempt table, show how this data is now stored in the
revised table designs.

Table: Student

StudentName TutorGroup Tutor

Table: StudentSubjectChoices

StudentName Subject Level SubjectTeacher

[3]

(c) (i) Explain what is meant by a primary key.

[2]

© UCLES 2012 9608/01/SP/15 [Turn over


4

(ii) A student is not allowed to choose the same subject at A Level and AS.

What is the primary key of table StudentSubjectChoices?

[1]

(iii) There is a relationship between tables Student and StudentSubjectChoices.

Explain how the relationship is established using a primary key and foreign key.

[2]

(d) The design of table StudentSubjectChoices is:

StudentSubjectChoices (StudentName, Subject, Level, SubjectTeacher)

Explain why this table is not in Second Normal Form (2NF).

[2]

(e) The design of table Student is:

Student (StudentName, TutorGroup, Tutor)

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

[2]

© UCLES 2012 9608/01/SP/15


7

3 A company uses a relational database, EMPLOYEES, to store data about its employees and
departments.

(a) The company uses a Database Management System (DBMS).

(i) The DBMS has a data dictionary.

Describe what the data dictionary stores.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(ii) The DBMS has a query processor.

Describe the purpose of a query processor.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [2]

(b) Relationships are created between tables using primary and foreign keys.

Describe the role of a primary and a foreign key in database relationships.

...................................................................................................................................................

...................................................................................................................................................

...................................................................................................................................................

............................................................................................................................................. [2]

© UCLES 2019 9608/13/M/J/19 [Turn over


8

(c) In the company:

• An employee can be a manager.


• A department can have several managers and several employees.
• An employee can only belong to one department.

The EMPLOYEES database has three tables:

EMPLOYEE_DATA(EmployeeID, FirstName, LastName, DateOfBirth, Gender,


DepartmentNumber)
DEPARTMENT(DepartmentNumber, DepartmentName)
DEPARTMENT_MANAGER(DepartmentNumber, EmployeeID, role)

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

EMPLOYEE_DATA

DEPARTMENT_MANAGER DEPARTMENT

[3]

(d) Give three reasons why the EMPLOYEES database is fully normalised.

1 ................................................................................................................................................

...................................................................................................................................................

2 ................................................................................................................................................

...................................................................................................................................................

3 ................................................................................................................................................

...................................................................................................................................................
[3]

© UCLES 2019 9608/13/M/J/19


9

(e) Part of the EMPLOYEE_DATA table is shown.

EmployeeID FirstName LastName DateOfBirth Gender DepartmentNumber


156FJEK Harvey Kim 12/05/1984 Male S1
558RRKL Catriona Moore 03/03/1978 Female F2
388LMDV Oscar Ciao 01/01/1987 Male F2

(i) Write a Data Definition Language (DDL) statement to create the EMPLOYEES database.

...........................................................................................................................................

..................................................................................................................................... [1]

(ii) Write a DDL statement to define the table EMPLOYEE_DATA, and declare EmployeeID
as the primary key.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [5]

© UCLES 2019 9608/13/M/J/19 [Turn over


10

(iii) Write a Data Manipulation Language (DML) statement to return the first name and last
name of all female employees in the department named Finance.

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

...........................................................................................................................................

..................................................................................................................................... [5]

© UCLES 2019 9608/13/M/J/19

You might also like