You are on page 1of 8

ajb82

BOLTON INSTITUTE DEPARTMENT OF COMPUTING AND ELECTRONIC TECHNOLOGY BSc (HONS) COMPUTING SEMESTER 2 EXAMINATION 2002/2003 ADVANCED DATABASE SYSTEMS MODULE NO: CST3003
Date: Friday 6 June 2003 Time: 9.30 am 11.40 am (includes 10 minutes reading time)

INSTRUCTIONS TO CANDIDATES:

There are SIX questions Answer FOUR questions

Page 2 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 1 (a) Two of the models for the distribution of data are : a distributed database, and a client multiserver system. Explain, by means of a diagram, each of the above models, and the purpose of each component of your models. [9 marks] (b) In a replication system, a replication service is appended to each local database. (i) What are the two main roles of the replication server? [4 marks] Replication involves eIther consolidation or dissemination. (ii) (c) Describe what is meant by these terms with a simple example of each. [4 marks] In a distributed database the data may be fragmented horizontally or vertically. Explain by examples what is meant by each of these two types of fragmentation, and when each type is appropriate. [8 marks] Question 2. (a) Outline the four characteristics of decision support systems [4 marks] (b) The data warehouse model has four software components: extract, integrate, aggregate navigator, and presentation tools Describe the function of each component and give a diagram showing their relationships to each other and the data warehouse. [7 marks] (c ) Distinguish between the two ways of approaching the elicitation of knowledge in data: hypothesis verification and knowledge discovery. [3marks]

Question 2 continued over page

Page 3 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 2 continued (d) Give an outline of the processes involved in Knowledge Discovery in Databases (KDD). Relate your answer to an application such as introducing a new product line for sale by a commercial organisation. [7 marks] (e) Two data mining operations are classification, and sequence discovery. Explain what each of these is, and give an example of each relating to the operation of a supermarket. [4 marks] Question 3 (a) Representing geometric figures such as triangles or rectangles in a database is an example of complex data. There are two ways of representing drawings consisting of points, lines and triangles etc, using either (i) (ii) a single table, where each point is represented as a row in the table, with an identifier for the shape it belongs to separate tables for each type of polygon in the drawing

For the example below involving a few different shapes show how the two representations would work. [6 marks] 2

Square A Square B
T1 T2

0 (iii)

Evaluate the two approaches in (c) in terms of storage space, and ease of displaying a drawing of polygons [4 marks]

Question 3 continued over page

Page 4 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 3 continued (c) Oracles Extract Transform and Load (ETL) process changes the process flow for these common data warehousing operations, from earlier models, namely transform then load and load then transform. (i) (ii) Explain by means of diagrams what these two earlier models were. [6 marks] The ETL Toolkit introduces three new concepts to help the integrated approach to these operations, namely External Tables, Multi-table Insert and Upsert. Explain what each means, and discuss the reasons for each of these new concepts. [9 marks] Question 4. (a) A university specialising in distance learning has regional offices that deal with the students from that region. Personal details and assignment and examination marks are held for each student at the regional office where they are registered. However, people across the organisation need to be able to use data from many regional sites. The following two alternative ways of enabling the use of the data are to be considered: A. Each site has an autonomous database server, to which client systems at other sites connect when access to the data is required. B. Each site has a replication server that transfers to other sites a copy of whatever data is required by users of the local database at those sites Give an answer to each of the following questions for each of the two ways above of sharing data (i) An application process requires the average marks for a module which requires data originating from all the regions. Describe, and give reasons for, the SQL statements that are needed for such an application process in each of the two ways A and B given above You may assume that a single query statement would retrieve the data if there were only one database [8 marks]

Question 4 continued over page

Page 5 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 4 continued (ii) A manager needs to record that a student has changed registration from one region to another. Explain whether a managers application process, for each of the two ways, A and B, given above, can make the required transfer of student data to the database of the new region. Describe, and give reasons for, the SQL statements that are needed for such an application process. [9 marks]

(b)

State whether each of the following five statements is true or false, and give a reason for your answer. (ANSWERS WITHOUT REASONS SCORE ZERO) 1) The two-phase commit protocol usually takes twice as many control signals as a simple commit and acknowledge protocol. 2) A replication system for distributing data requires a global schema 3) Distribution optimisation includes choosing how to execute each local retrieval operation most efficiently 4) In a data warehouse time is always a dimension of analysis. [8 marks]

Question 5 (a) (b) Explain the advantages of using packages in PL/SQL For the following example of a using a cursor [4 marks]

DECLARE CURSOR instructor_cursor (in_date_hired DATE) IS SELECT instructor_id FROM instructor WHERE date_hired < in_date_hired FOR UPDATE; instructor_record instructor_cursor%ROWTYPE; new_salary NUMBER := 2000; v_date DATE := '01-JAN-86'; BEGIN OPEN instructor_cursor(v_date); LOOP FETCH instructor_cursor INTO instructor_record; EXIT WHEN instructor_cursor%NOTFOUND; UPDATE instructor SET salary = new_salary WHERE CURRENT OF instructor_cursor; END LOOP; CLOSE instructor_cursor; END; ; Question 5 continued over page

Page 6 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 5 continued (i) (ii) Explain the purpose of the cursor. [3 marks] Explain the purpose of the block of code between BEGIN and END [3 marks] Explain the meaning of each of the four keywords that have been emboldened: FOR UPDATE, instructor_cursor(v_date), cursor%NOTFOUND , WHERE CURRENT OF [4 marks]

(iii)

(c)

When a value for the price column in a Product table is updated, it is simply replaced by a new value, with no record of the old value. It would be useful to have an audit trail of such price changes. The Product has columns such as product_id, product_name, price, stock_level, etc Suppose a table called AuditPrice is created , and whenever the column, price, in Product changes, a row recording the change is inserted into AuditPrice. AuditPrice has columns such as product_id, old-price, newprice, date_changed There are two ways of doing this: 1) Create a procedure that both updates price in Product and inserts the change into AuditPrice. 2) Create a trigger on Price for the event UPDATE OF price, which when triggered inserts the change into AuditPrice (i) (ii) Outline the PLSQL for the trigger and the procedure (exact SQL syntax not required) [7 marks]

Explain the difference in the privileges required for the invocation of the trigger and of the procedure [4 marks]

Please turn the page

Page 7 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 6. (a) Explain the reasons for the differences between the data held in a data warehouse and the data held in an 'operational' database. [4 marks] Explain what is meant by the dimensional analysis approach to data warehouse design. Give a simple example with which you are familiar, such as Sales, and explain why it usually leads to a star schema [4 marks] The Open Tele Case Study referred to in the course has an E-R diagram as shown on the next page: The directors wish to trace the customers usage of the network. (i) For Open Telecoms data warehouse for network usage, identify with reasons, its facts and dimensions. Draw up a star schema for the warehouse. [7 marks] (ii) Explain briefly how records could be written to the data warehouse for setting up initially, and then on a day-to-day basis. [4 marks] (iii) Give three examples of typical questions that the directors could get answers to from the warehouse. [6 marks]

(b)

(c)

Question 6 continued over page

Page 8 of 8 Computing & Electronic Technology BSc (Hons) Computing Semester 2 Examinations 2002/2003 Advanced Database Systems Module No: CSt3003 Question 6 continued

Connection Point

Rate

Customer

Telephone Number

Call

Invoice

ChargeBand

The entity types in the E-R model are as follows:Customer (AccountNumber, Name, Category, Address, PostCode) ConnectionPoint (NodeNumber, ClassOfSwitch) Rate (RateCode, RatePerSecond) Call ( TelNumber, StartDate, StartTime, NumberCalled, CallDuration, CallCost) LineRental (RentalClass, BillFrequency,RentalAmount) ChargeBand (BandCode, BandDescription, StartTime, StopTime, ChargeFactor) Invoice (TelNumber, Date, InvoiceAmount, VAT)

END OF QUESTIONS