Beruflich Dokumente
Kultur Dokumente
Section A
.,_
Sect B Q1
~.1\, l
'
,.\
-.:
-!":,'.
~.
<"t !,',
....-
(.
"t.,
S~BQ4
.-'
~\
\1\
):<'l
./
,f
FIT1004
TITLE OF PAPER:
Data Management
EXAM DURATION:
READING TIME:
10 minutes
D Open Learning
D Sth Africa
During an exam, you must not have in your possession, a book, notes, paper, electronic device/s,
calculator, pencil case, mobile phone or other material/item which has not been authorised for the
exam or specifically permitted as noted below. Any material or item on your desk, chair or person will
be deemed to be in your possession. You are reminded that possession of unauthorised materials in an
exam is a discipline offence under Monash Statute 4.1.
AUTHORISED MATERIALS
CALCULATORS
DYES
lXI NO
OPEN BOOK
DYES
1&1 NO
DYES
1&1 NO
STUDENT ID
DESK NUMBER
Page 1 of 40
Page 2 of 40
Section A:
1.
Since it is used to link the tables that originally were related in a M:N relationship, the
composite entity structure includes-as foreign keys-at least the _ _ keys of the tables that
are to be linked.
a. composite
c. pnmary
b. super
d. umque
2.
The special operator used to check whether an attribute value is within a range of
values is
a. BETWEEN
c. LIKE
b. NULL
d. IN
3.
Accurate, relevant, and timely information is the key to _ _ .
a. data management
c. knowledge
d. understanding
b. good decision making
4.
As long as two transactions, Tl and T2, access __ data, there is no conflict, and the
order of execution is irrelevant to the final outcome.
a. shared
c. umelated
b. common
d. locked
5.
a.
b.
c.
d.
ANSI defines four events that signal the end of a transaction. Of the following events,
is defined by ANSI as being equivalent to a COMMIT.
Five SQL statements are executed.
The end of a program is successfully reached.
The program is abnormally terminated.
The database is shut down for maintenance.
6.
A table that is in 2NF and contains no transitive dependencies is said to be in _ _ .
a. lNF
c. 3NF
b. 2NF
d. 4NF
Page 3 of 40
Page 4 of 40
7.
a.
b.
c.
d.
8.
The SQL aggregate function that gives the total of all values for a selected attribute in
a given column is __ .
a. COUNT
c. MAX
b. MIN
d. SUM
9.
A
should be a derived attribute.
a. Person's name
c. Person's social security number
b. Person's age
d. Person's phone number
10.
BCNF can be violated only if the table contains more than one __ key.
a. pnmary
c. foreign
b. candidate
d. secondary
11.
__ are important to ensure data integrity.
a. Attributes
c. Relationships
b. Entities
d. Constraints
12.
All primary key entries are unique, and no part of a primary key may be __ .
a. zero
c. null
b. a foreign key
d. a candidate key
13.
If an employee within an EMPLOYEE entity has a relationship with itself, that
relationship is known as a __ relationship.
a. self
c. looping
b. self-referring
d. recursive
14.
A(n) __ represents a particular type of object in the real world.
a. attribute
c. relationship
b. entity
d. constraint
15.
The most likely data type for a surrogate key is __ .
a. Character
c. Logical
b. Date
d. Numeric
Page 5 of 40
Page 6 of 40
16.
The Oracle
a. DATE
b. SYSDATE
17.
Lock
a. granularity
b. shrinking
18.
In Oracle, __ makes it possible to merge SQL and traditional programming
constructs, such as variables, conditional processing (IF-THEN-ELSE), basic loops (FOR and
WHILE loops,) and error trapping.
c. embedded SQL
a. triggers
d. procedural SQL
b. indexes
19.
A(n) __ phase in a two-phase lock is when a transaction releases all locks and
cannot obtain any new lock.
c. locking
a. growmg
b. shrinking
d. unlocking
20.
A __ is a logically connected set of one or more fields that describes a person, place
or thing.
a. database
c. record
d. file
b. column
[20 x 0.5 = 10 marks]
Page 7 of 40
Page 8 of 40
Section B:
(10 marks)
(a) The following table shows a sample data record from an Australian botanical collection:
Source institute
Accession number
Scientific name
Collection
Collection number
Additional collectors
Region
Near named place
Location
Geocode source
Geocode precision
Record update date
CANS
564849
Eucalyptus regnans F.Muell.
Nicolle, D.; 02-Jan-2002 , Field collection
4316
None
Victoria, Australia
NA
Latitude -38.833 Longitude 143.666
unknown
1000.0
The Scientific name indicated above consists of the Genus, Species and the Authority who first
described the species (here Victorian Botanist Ferdinand von Mueller). Collection consists of the
person who made the collection, the date of the collection and the type of the collection.
Explain the following terms and, in each case, give one example to show how it could be applied to
the above data record:
i)
Granularity
ii)
Dublin Core
iii)
Data quality
[3x2 = 6 marks]
Page 9 of 40
Page 10 of 40
Ql(a) continued:
Page 11 of 40
Page 12 of 40
(b)
Page 13 of 40
Page 14 of 40
(20 marks)
The local under-sixteen football league needs a database to help track teams, children that sign up to
play in the league, the parents ofthese children and the coaches for each team.
The league wishes to record the details for each parent of a particular player (the parents last name,
first name, phone contact number and address).
For each player the system needs to record the player's last name, first name, blood type and their date
of birth. Any allergies that the player has also need to be recorded. A player may only play in one team
with this league.
Each team is given a unique id, the system needs to record this id, the teams name and the city their
home ground is located in (a city may have several under-sixteen teams based in it). A teams colours
are also to be recorded, teams may choose to use a single or multiple team colours. A team may have
several coaches- one of the coaches is designated as the head coach. A coach is only permitted to
coach one team in the under-sixteen league. All communications from the league to the team are via
the head coach. To be registered to play in this league a team must have a head coach and at least one
player. The database needs to track a coach's first and last name, phone and address contact details and
the team that they are coaching.
Create a relational Logical Model to represent the data requirements described above for this undersixteen league. Your model must
[20 marks]
Page 15 of 40
Page 16 of 40
Page 17 of 40
Page 18 of 40
(10 marks)
(a) Students enrol in/complete units. A conceptual ER model of the scenario is shown below:
STUDENT
student id [PK]
student_name
student_address
student phone
UNIT
enrols/completes
unit code [PK]
- - - - - - - ~ unit_name
unit points
In addition to the data above, the model should also allow the recording of a student's year and
semester of enrolment, a final unit result as a percentage result and a final unit grade. If a student fails
a unit (grade N) the structure should maintain this fail grade and associated mark in the system and
allow the student to repeat the unit. The grade must be one ofN, P, C, D, HD. The percentage result
must be between 0 and 100 (inclusive).
Convert the conceptual ERD above into a logical model, including the extra items are to be recorded.
[5 marks]
Page 19 of 40
Page 20 of 40
(b)
Using the logical model you designed for part (a), write the SQL statements needed to create
the table that contains the attributes to store the students unit result/s. Your schema
should include a primary key definition, as well as appropriate referential integrity references
and appropriate column check/s and make use of named constraints.
[5 marks]
Page 21 of 40
Page 22 of 40
(10 marks)
Question 4 Normalisation
Monash University owns several performance halls that are used by organizations within and outside
Monash University. The following table shows the booking information for several performances
across different venues in Monash University. Multiple performances can be organized at the same
time across multiple venues.
Start
Time
8PM
Date
Venue
Venue
Location
Clayton
12-Jan-20 12
8PM
12-Jan-2012
Robert
Blackwood Hall
K3.24
2PM
14-Jan-2012
8PM
8PM
Event Type
Music concert
Caulfield
Comedy
Event
Description
Melbourne
Symphony
Adam Hill
Robert
Blackwood Hall
Clayton
Musical
Cats
14-Jan-2012
Alexander
Theatre
Clayton
Comedy
Dave
Hughes
16-Jan-2012
Robert
Blackwood Hall
Clayton
Music concert
Hoodoo
Guru
Organiser
MSO
Melbourne
Comedy
Festival
Monash
Student
Association
Melbourne
Comedy
Festival
Mushroom
Promoter
Organiser's
contact
(03)
99021212
(03)
99031456
(03)
99012233
(03)
99031456
(02)
90021002
Page 23 of 40
Page 24 of 40
Page 25 of 40
Page 26 of 40
(b) Normalisation
UNF
Primary Key
lNF
2NF
3NF
[4 + 6 = 10 marks]
Page 27 of 40
Page 28 of 40
Question 5 SQL
(30 marks)
Appendix A shows the logical model for a PAYROLL database. Also provided is the Oracle schema
file for creating the database structure. Using SQL, write commands to achieve the following
results on the PAYROLL database:
a) Display all the names of MANAGERs in the company.
b) Display the employees' name and monthly salary for SALESREP who have not
earned any commission yet.
c) Display the employee name, job, department name, location and monthly salary of
employees that work in Dallas. The result should be ordered by job.
d) Display the name and job of employees who do not work in TRAINING or SALES
department.
Page 29 of40
Page 30 of 40
e) Display the employees who were born in the first half of the 60s. Display the output in
birth date order.
f)
Display the name and location of all departments, and the name of their employees.
Display the output in employee name order within department name order.
g) Display employee name and the amount of the annual salary for the highest paid
employee in the company.
h) Display the names of employees who earn the same amount of monthly salary as
'MILLER' but not having the same job as MILLER.
i)
For each department list the department number and name, the number of employees,
the minimum and maximum monthly salary, the total monthly salary and the average
salary paid to their employees. Name the columns: NbrOfEmployees, MinSalary,
MaxSalary, Total Salary, A vgSalary.
Page 31 of 40
Page 32 of 40
j)
List the department names that have average monthly salary of its employees higher
than the average monthly salary in the company.
k) The manager for SALES department "BLAKE" has left the company. "MARTIN" has
been assigned as the new manager. In the new position MARTIN should earn the
same monthly salary as BLAKE's. BLAKE job is set to NULL. Performs necessary
updates to employee and department tables to reflect the changes.
[1 + 2 + 2 + 2 + 2 + 3 + 3 + 3 + 3 + 4 + 5 = 30 marks]
Page 33 of 40
Page 34 of 40
(10 marks)
a) The four ACID properties required of a transaction are: Atomicity, Consistency, Isolation and
Durability -explain the meaning of each of these properties.
[4 marks]
b) Explain the following statement: "a transaction is a logical unit of work". Use an example to
illustrate you explanation.
[2 marks]
Page 35 of 40
Page 36 of 40
c) Suppose your database system has failed. Describe the database recovery process and the use
of deferred-write and write-through techniques to achieve recovery
[4 marks]
[2+4+4= !Omarks]
Appendix A:
deptno
~lJ\1ER
i ?i(]
(!2.0'
- -staffed~
--
deotrJa"le VARCNAR\10)
--,
COURSE
I
I
I
I
I
I
~ ~<]
crscode. VARCi-IAR(E)
sa
O'M'. \0~1dtC:.6,2)
sa
sa
PvF';.OvU.
_ _ _ _ _ _ _q_;:'-'--=-=---=--------.
empno '~PJ\1ER,C(4,0J [ K 1
manages
empname. VARCHA'l/8)
emp<'1:t. VARC-IAR(5)
e,-,ojob VARC!AR(Sl
~~~e!0..:.c:,
empbdare DA i
empmsa' ':UMERIC(6,2J
e'11pcomm "oUME::I. ((6,3)
I
I
I
I
I
I
I
I
de;WIO '<U0,.1ER:CI2,0) ;
ngrno.
'<UM~R:C(4.0l
off:oca::on VARC4AR(8J
empno \UMR.C(4,0) \ ;K I
~K.]
: "K]
has
nas
co'np'.etes
offbegnda:e DATE :
P~K.)
f).s:msa: !I<UMC.R.Cf6,2)
-, stcomments VARC>iAR(60l
dept,lo. NUMERlC(2,0) [ FK]
Create Table
sal grade
sal lower
sal upper
salbonus
'SALGRADE'
Salary Grade
Salary lower limit
Salary upper limit
Salary bonus
'COURSE'
Course Code
Course Description
Course Category
Course Duration
'DSG' )));
Page 38 of 40
'DEPARTMENT'
Department Number
Department Name
Location of department
Employee who manages department
(references EMPLOYEE.empno)
FK constraint cannot be added until employee table is created
Create Table
dept no
deptname
deptlocation
empno
'EMPLOYEE'
Employee number
Employee name
Employee initials
Employee job
Employee birthdate
Employee monthly salary
Employee commission
Department Number (references
DEPARTMENT.deptno)
mgrno: Employees manager (empno of manager) (references
EMPLOYEE.empno)
Create Table
dept no
histbegindate
histbeginyear
'HISTORY'
Department Number (references DEPARTMENT.deptno)
Date history record begins
: Year history record begins
Page 39 of 40
histenddate
histmsal
histcomments
empno
'OFFERING'
Begin date for offering
Course Code (references COURSE.crscode)
Location for offering
Employee number for employee running offering
(references EMPLOYEE.empno)