You are on page 1of 7

Final Examination

Semester 1, 2012
ISCG5423 Introduction to Databases

Department of Computing

Date:
18th June 2012
Commencement Time: 9.00am
Time Allowed:
2 hours plus 10
minutes reading time
Weighting:
50%
Marks:
100

Instructions:
1. No writing or highlighting is permitted during reading time.
2. Write answers to all questions in the answer booklet provided.
3. Commence each QUESTION on a new page.
4. Calculator is NOT PERMITTED.
5. Any form of dictionary is NOT PERMITTED.
6. All diagrams must be drawn neatly.
7. Take care with your handwriting, as illegible writing will not be marked

Summary of paper:
Answer ALL Questions

100

TOTAL MARKS

100

Anything written in this exam paper will NOT be marked


Please use the Answer Booklet provided

5423-1122

Printed 01/11/2016

Page 1 of 7

INSTRUCTIONS:
Answer all questions.
Begin the answer to each question on a separate page.

Question 1

[10 marks]

The following table shows un-normalised data for a lending library. Examine the table and write the
relations (in standard relation notation) needed to store this data in third normal form.
Please note that there is no need to draw an ERD.
Author
ID
1
1
1
2
2
3
3
4

Name
Ian
Fleming
Ian
Fleming
Ian
Fleming
Len
Deighton
Len
Deighton
Elmore
Leonard
Elmore
Leonard
John
Grisham

Date
Borrowed
3-4-06

Boo
k ID
101

Book Title

Pages
210

Member
ID
M001

Member
Name
Jack Jones

Dr. No

12-1-06

102

Goldfinger

250

M002

102

Goldfinger

250

M003

Sarah
Harris
Jim Smith

3-4-06
2-3-06

103

270

M001

Jack Jones

3-3-06

103

Violent
ward
Fighter

260

M002

21-3-06

104

Switch

210

M003

Sarah
Harris
Jim Smith

15-2-06

105

Swag

190

M002

Sarah
Harris

106

The Broker

350
M004

John
Harrison

Question 2

[10 marks]

Examine the relations (written in standard relation notation) below. Draw an Entity Relationship
Diagram (ERD) to depict these relations. You must state any assumptions that you make.
INVESTIGATOR (InvestigatorID, InvestigatorLName, InvestigatorFname, HourlyRate)
CASE (CaseID, DateOpened, Status, TypeID*)
CASE_TYPE(TypeID, TypeDescription)
INVESTIGATION(CaseID*, InvestigatorID*, Hours)

Question 3

[4 marks]

Define the term transitive dependency. Use an example to illustrate the term.

Question 4

[12 marks]

Examine these business rules and draw a conceptual ERD.

5423-1122

Printed 01/11/2016

Page 2 of 7

Each car must be owned by one and only one owner.


Each owner may own one or more cars.
Each car must receive one or many services.
Each service may be carried out on zero or many cars.

5423-1122

Printed 01/11/2016

Page 3 of 7

Question 5

[14 marks]

Examine the following ERD. Several non-key attributes are duplicated or have aliases or are in the
wrong entity. List each non-key attribute and explain what should be done with that attribute.

SITE

Species Observation ERD

SiteID
SiteName
SiteLocation
SiteArea
NumberSeen
SpeciesName

OBSERVATION

SiteID (FK)
SpeciesID (FK)
NumberSeen
SpeciesName
Name
Location

Question 6

SPECIES

SpeciesID
SpeciesName
Protected
NumberSeen
SiteArea
Location

[18 marks]

Given below is a conceptual ERD plus a list of attributes. Convert the conceptual ERD into a
logical ERD. Then convert the list of attributes into a set of relations (written in standard relation
notation) creating primary and foreign keys where necessary.

RECIPE

INGREDIENT

INGREDIENT
TYPE
IngredientName
QuantityonHand
RecipeName
QuantityNeeded (Ingredient for a particular recipe)
IngredientType
IngredientTypeDescription

5423-1122

Printed 01/11/2016

Page 4 of 7

RecipeType

5423-1122

Printed 01/11/2016

Page 5 of 7

Question 7

[4 marks]

What is the purpose of a foreign key in a relational database? Explain how a foreign key is related
to a primary key.

Question 8

[4 marks]

We wish to store the following fields in an MS Access database table:


Course number a 4-digit number
Number of students in the course number
Course Fee a value in New Zealand dollars
Enrolments open Boolean (open or closed)

Identify the name you will give each field and state the data type and field size (where appropriate)
you will use.

Question 9
EmpID

[12 marks]

LastName FirstName HourlyRate HoursWorked

Type

E001

Adams

Sarah

20.00

39

E002

Brown

Joe

25.00

38

E003

Bane

Eric

26.00

40

E004

Jones

Mick

21.00

41

E005

Headon

John

22.00

42

E006

Chime

Terry

19.00

43

E007

Boone

Albert

18.00

44

E008

Bite

Jack

21.00

40

E009

Smith

Bill

24.00

38

E010

Gordon

David

23.00

37

Given the sample data in the Employee table above, write down the expected results of the
following SQL statements.

a) SELECT LastName, FirstName


FROM Employee
WHERE LastName LIKE %e;
b) SELECT LastName, FirstName
FROM Employee
WHERE LastName LIKE B%;

5423-1122

Printed 01/11/2016

Page 6 of 7

c) SELECT LastName, FirstName


FROM Employee
WHERE FirstName LIKE %i%;

Question 10

[4 marks]

Describe any four types of threat to database security.

Question 11

[4 marks]

Explain four advantages or disadvantages of Views.

Question 12

[4 marks]

What is data integrity and why is it important that it is achieved?

5423-1122

Printed 01/11/2016

Page 7 of 7

You might also like