Download ) ANSWERS DATABASE DESIGN (H4

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft SQL Server wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

PL/SQL wikipedia , lookup

SQL wikipedia , lookup

Database wikipedia , lookup

Concurrency control wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Functional Database Model wikipedia , lookup

Clusterpoint wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
IMIS HIGHER DIPLOMA QUALIFICATIONS
DATABASE DESIGN
(H4)
ANSWERS
Thursday 4th June 2015 10:00hrs – 13:00hrs
DURATION: 3 HOURS
Candidates should answer ALL the questions in Part A and THREE of the five
questions in Part B. Part A carries 40% of the marks available and Part B
carries 60%. Candidates should allocate their time accordingly.
No reference material of any kind may be taken into the examination.
[Turn over]
© Institute for the Management of Information Systems Page 1 of 10
PART A. Answer ALL questions in this section
Question A1
The first stage in creating a Data Warehouse is Extraction. Describe this
extraction process including some of the potential problems that need to be
addressed.
(5 marks)
Targets multiple data sources both internal and external. Need to establish
frequency and monitor the process over time to ensure it is still appropriate. There
may be issues with poorly documented/maintained source systems and different
data formats/technologies. Other relevant points. Up to a maximum of five marks.
Question A2
Explain the term Fragmentation Transparency in the context of a Distributed
Database Management System.
(5 marks)
User does not need to know that the data is fragmented. Database accesses based
on the global schema so user does not need to specify fragment names or data
locations. SQL statement is the same as it would be in a centralised system
Question A3
List, in order, the stages in parsing a SQL query that a query optimiser would
carry out.
(5 marks)
Validate for syntax compliance
Validate against data dictionary to ensure tables and column names are correct
Validate against data dictionary to ensure user has proper access rights
Analyse and decompose into atomic components
Optimise by transforming into equivalent but efficient SQL query
Prepare for execution by determining most efficient execution plan
Any five, minus one mark for the wrong order
© Institute for the Management of Information Systems Page 2 of 10
Question A4
Explain the difference between a conceptual data model and a logical data
model
.
(5 marks)
Conceptual data model is a model of the information use in an enterprise
independent of target DBMS, hardware, programs/languages
Logical data model is a model of the information use in an enterprise based on the
model of the target DBMS but ignoring physical details such as indexes, storage
structures. Up to a maximum of five marks.
Question A5
A major advantage of database systems over conventional file-based systems
is said to be the control of redundancy. Explain this term and why it is an
advantage.
(5 marks)
Conventional systems store data on the same entity in more than one place leading
to wasted space and potential inconsistency However DBMS may still duplicate in a
controlled way in order to model data (e.g. foreign keys) or to improve performance
Question A6
Explain, with examples, the difference between Data Manipulation commands
and Data Definition commands in Structured Query language (SQL)
(5 marks)
DM commands used to alter or retrieve data in the database tables – suitable
example such as SELECT, INSERT, UPDATE etc.
DD commands used to create database objects or access rights - suitable example
such as CREATE TABLE APTER TABLE, DROP INDEX etc.
Up to a maximum of five marks.
Question A7
Discuss ways in which a commercial bank could make use of data mining
(5 marks)
Up to two marks for each up to a maximum of five
Detecting fraud
Identifying customer loyalty
Predicting changing customer needs
Determining customer spend by customer groups
Other reasonable point
© Institute for the Management of Information Systems Page 3 of 10
Question A8
NULL has a specific significance in Structured Query Language (SQL). Explain
its function and the use of NOT NULL in data definition with a suitable
example.
(5 marks)
NULL does not mean zero or space but a missing value, an unknown attribute or a
condition that is not applicable. NOT NULL can force any inserted record to have a
value in a field. Suitable example Up to a maximum of five marks.
PART B. Answer any THREE of the following FIVE questions.
Question B9
Use the following tables to answer the questions below
STUDENT table
Surname
Sidney
Henry
James
Jordan
Eric
Florence
Vera
Gertrude
EXAM table
Module
H1
H2
H3
H4
H5
Forename
Souza
Hoover
Kazembe
Sakala
Mphande
Muamba
Amiobe
Harawa
Module
H4
H3
H4
H4
H3
H2
H2
H3
Examname
Project Management
Advanced mathematics
Systems and Networks
Database Fundamentals
Professional Issues
© Institute for the Management of Information Systems Page 4 of 10
Mark
65
45
40
56
75
49
22
79
a)
Write a SQL statement to produce a list of all the records in the
STUDENT table
(3 marks)
SELECT * FROM STUDENT;
for SELECT
for *
for correct table name
Minus a mark for every syntax error
b)
Write a SQL statement to produce the SURNAME, FORENAME and
MARK of all students who took H2
(4 marks)
SELECT SURNAME, FORENAME, MARK FROM STUDENT WHERE MODULE =
“H2”
for SELECT
for correct column list
for correct table name
for correct WHERE modifier
Minus a mark for every syntax error
c)
Write a SQL statement to produce a list of SURNAMES of all students
who scored less than 50% in any exam
(4 marks)
SELECT SURNAME FROM STUDENT WHERE MARK < 50;
for SELECT
for correct column list
for correct table name
for correct WHERE modifier
Minus a mark for every syntax error
d)
Write a SQL statement produce a list of all the student SURNAMEs and
the EXAMNAME that each has taken
(5 marks)
SELECT SURNAME, EXAMNAME FROM STUDENT, EXAM WHERE
STUDENT.MODULE=EXAM.MODULE;
for correct column list
for correct table names
for correct WHERE modifier
Minus a mark for every syntax error
© Institute for the Management of Information Systems Page 5 of 10
e)
It has been decided that the Examiner’s surname needs to be added to
the EXAM table, thus
EXAM table
Module
H1
H2
H3
H4
H5
Examname
Project Management
Advanced mathematics
Systems and Networks
Database Fundamentals
Professional Issues
Examiner
Smith
Walters
Tchana
Jones
Doyle
Write a SQL statement make this change to the table structure
(4 marks)
ALTER TABLE EXAM ADD (EXAMINER CHAR(15));
for ALTER TABLE
for ADD
for EXAMINER
for suitable type (e.g. char(15))
(Total 20 marks)
Question B10
a) Define and explain the meaning of the word “transaction” in the
context of database interactions
(4 marks)
An action or series of actions carried out by a user or program that reads or updates
the content of a database.
A logical unit of work
May be a complete program, part of a program or a single statement Up to a
maximum of four marks.
b)
Haerder and Reuter (1983) used the acronym ACID to define four
fundamental properties of all transactions. Describe these four
properties using examples to aid your explanation.
(16 marks)
Atomicity - All or nothing, indivisible unit performed in its entirety or not at all.
Suitable example (up to four marks)
Consistency - DB is transformed from one consistent state to another. Suitable
example (up to four marks)
© Institute for the Management of Information Systems Page 6 of 10
Isolation - Transactions execute independently of each other,partial or incomplete
transactions should not be visible to other transactions. Suitable example (up to four
marks)
Durability - successfully completed (committed) transactions are permanently
recorded and not lost due to subsequent failure. Suitable example (up to four marks)
(Total 20 marks)
Question B11
Test Beds is a company that performs various tests on products. The table
below shows the planned testing of three products.
T#
T1
T2
T3
Tname
Thermal
test
Stress Test
TDate
1/6/15
4/8/15
Acceptance 8/9/15
Test
TLoc
London
New
York
Paris
S#
S1
SSName SFName SW# SWName SWSize Fee
James
David
SW1 Focus
2GB
4000
S2
Peter
SW2 Slant
SW1 Focus
1GB
2GB
3000
4500
David
SW3 Lift
SW1 Focus
5GB
2GB
2500
5000
SW2 Slant
SW3 Lift
1GB
5GB
4000
3500
S1
Edwards
James
T# - Test number
TName – Test name
TDate – Test Start Date
TLoc – Test Location
S# - Staff number for staff member conducting the test
SSName – Surname of staff member
SFName – Forename of staff member
SW# - Software module needed for the test, a unique identifier
SWName – Software module name
SWsize – Size of software module
Fee – Fee for use of that module on that project
Using this data explain the transformation into first, second and third normal
form
(Total 20 marks)
© Institute for the Management of Information Systems Page 7 of 10
Explanation of 1st normal form – remove repeating groups (2 marks)
TEST (T#, TName, TDate, TLoc, S#, SSName, SFName)
SOFTWARE (T#, SW#, SWName, SWSize, Fee)
(4 marks)
Explanation of 2nd normal form – remove partial dependency (2 marks)
TEST (T#, TName, TDate, TLoc, S#, SSName, SFName)
TEST-SW (T#, SW#, Fee)
SOFTWARE (T#, SW#, SWName, SWSize)
(5 marks)
Explanation of 3rd normal form – remove indirect dependency (2 marks)
TEST (T#, TName, TDate, TLoc, S#, SSName, SFName)
STAFF (S#, SSName, SFName)
TEST-SW (T#, SW#, Fee)
SOFTWARE (T#, SW#, SWName, SWSize)
(5 marks)
(Total 20 marks)
Question B12
a)
Explain with the use of diagrams the difference between a Distributed
Database management System, Distributed Processing and a Parallel
Database management System
(16 marks)
DDBMS – suitable diagram similar to figure 24.2 in set text T1
Single logical DB split into fragments allocated to sites under the control of separate
DBMS other suitable points. Up to SIX marks for this part
Distributed Processing – suitable diagram similar to figure 24.1 in set text T1
Centralised DB with users accessing this over a network other suitable points Up to
FOUR marks for this part
Parallel DBMS – suitable diagram similar to figure 24.3 in set text T1
DBMS running across multiple processors and discs operates operations in parallel
sharing resources to improve performance other suitable points. Up to SIX marks for
this part
© Institute for the Management of Information Systems Page 8 of 10
b)
Briefly describe TWO potential advantages of a Distributed Database
management System
(4 marks)
Any TWO from
Reflects organisation structure
Improves shareability and local autonomy
Improves availability
Improves reliability
Improves performance
Cost effective
Allows modular growth
Integration of legacy systems
Other suitable points
for point for brief description
(Total 20 marks)
Question B13
You are a database designer who has been called in to investigate how a
database system might be developed. Your initial study can be divided into
the following four categories. Describe what each of these involves
a)
Analyse the company situation
(5 marks)
Look at how the company operates, its organisational structure and its mission. Look
at who reports to whom to define information flows other suitable points. Up to 5
marks
b)
Define problems and constraints
(5 marks)
Studying current system, manual and computer based elements collect problem
descriptions from all levels of the company (MD to end –users) define constraints
such as budget personnel other suitable points. Up to 5 marks
c)
Define objectives
(5 marks)
Look for the source of problemsand define common sources ensure system meets
objectives of end users consider interface with current systems consider potential
future developments consider sharing of data with other systems other suitable
points. Up to 5 marks
© Institute for the Management of Information Systems Page 9 of 10
d)
Define scope and boundaries
(5 marks)
Decide if the DB design encompass the entire organisation or just some departments
helps to define data structures and type of entities and physical size of DB
Boundaries are limits external to the system Do we need to use existing hardware or
software other suitable points. Up to 5 marks
(Total 20 marks)
END OF EXAMINATION
© Institute for the Management of Information Systems Page 10 of 10