Computer Assignment for AS
Computer Assignment for AS
1 A database is designed to store data about students at a college and the subjects which they
study.
Table: StudentSubjects
Chemistry A MEB
French AS HEN
Chemistry A MEB
Maths A COR
(a) (i) Explain why the table is not in First Normal Form (1NF).
[1]
[1]
Using the data given in the first attempt table, show how this data is now stored in the
revised table designs.
Table: Student
Table: StudentSubjectChoices
[3]
[2]
(ii) A student is not allowed to choose the same subject at A Level and AS.
[1]
Explain how the relationship is established using a primary key and foreign key.
[2]
[2]
[2]
3 A company uses a relational database, EMPLOYEES, to store data about its employees and
departments.
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
..................................................................................................................................... [2]
(b) Relationships are created between tables using primary and foreign keys.
...................................................................................................................................................
...................................................................................................................................................
...................................................................................................................................................
............................................................................................................................................. [2]
EMPLOYEE_DATA
DEPARTMENT_MANAGER DEPARTMENT
[3]
(d) Give three reasons why the EMPLOYEES database is fully normalised.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...................................................................................................................................................
3 ................................................................................................................................................
...................................................................................................................................................
[3]
(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]
(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]