THE UNIVERSITY OF TRINIDAD & TOBAGO FINAL ASSESSMENT/EXAMINATIONS SEPTEMBER/DECEMBER 2014 Course Code and Title: DBST5001 - Advanced Databases Programme: Masters of Science (MSc.) in Information and Communications Technology (ICT) Date and Time: Duration: 3 hours PLEASE READ ALL INSTRUCTIONS CAREFULLY BEFORE YOU BEGIN THIS EXAMINATION Instructions to Candidates 1. This paper has five (5) pages and three (3) sections. 2. You are required to answer only three (3) questions in Section A. Only the first three (3) responses will be marked. 3. You are required to answer all questions in Section B. 4. You are required to answer only one (1) question in Section C. Only the first response will be marked. 5. Use the answer booklet for all answers. 6. Write your Student ID in the space provided at the top of each page Key Examination Protocol 1. Students please note that academic dishonesty (or cheating) includes but is not limited to plagiarism, collusion, falsification, replication, taking unauthorized notes or devices into an examination, obtaining an unauthorized copy of the examination paper, communicating or trying to communicate with another candidate during the examination, and being a party to impersonation in relation to an examination. 2. The above mentioned and any other actions which compromise the integrity of the academic evaluation process will be fully investigated and addressed in accordance with UTT s academic regulations. 3. Please be reminded that speaking without the Invigilator s permission is NOT allowed. Page 1 of 5
SECTION A ( 30 marks ) Provide brief explanation, description, or discussion. State any assumptions you might have to avoid overly lengthy answers. Choose only three (3) questions. Only the first three responses will be marked. 1. Discuss the terms two-phase locking and Serializability. Give examples and/or diagrams to illustrate your answer (hint: discuss the two distinct phases of two-phase locking and the role of serial and interleaved schedules). 2. Describe the potential problems that may occur in a multi-user database if concurrency control techniques are not fully implemented (hint: how data may be damaged or lost, supported by a time-line diagram of two transactions accessing the same database). Give simple examples and/or diagrams to illustrate your answer. 3. Explain each of the following transaction management terms. As examples write a single sentence explaining the key idea. Each is worth two (2) marks (hint: you are writing very brief two (2) sentence description for each). a. Schedule b. Cascaded rollback c. Optimistic locking d. Pessimistic locking e. Checkpoint 4. Describe the term database transaction, explain what the ACID properties are and how they affect the behaviour of database transactions. Give simple examples and/or diagrams to illustrate your answer. Page 2 of 5
Answer all questions. SECTION B ( 45 marks ) Question 1 The following database contains Information about actors, plays, and roles performed. Customer(custID, firstname, midinit, lastmame, dob, email, phone) Vehicle (RegNum, type, Model, DateManufactured) Registration (custid, RegNum, Date) Repair(InvoiceNum, custid, RegNum, Date, Cost) 1. Write the SQL statements that define the relational schema (tables) for this database. Identify all appropriate keys. 2. Write the equivalent SQL query statements for the following: a. π Type(Vehicle) b. COUNT RegNum( Date < "01/01/06" (Registration)) c. RegNum COUNT InvoiceNum(Repair) d. π CustID, InvoiceNum(Registration X Repair) e. π CustID( MAX Cost (Repair)) f. π RegNum, Date(Repair= RegNum=RegNum Vehicle) 3. Give the relational algebra for the following: [12 marks] a. List all customer's names and phone numbers. b. List the registration number and manufacturer date of all vehicles that have been registered. c. List the registration numbers of all vehicles that have been repaired at least twice. d. List the names of all customers who have registered a vehicle that was manufactured after 01/01/2005. [8 marks] Page 3 of 5
4. Write an SQL query to find the customer name and phone numbers for all customers who have repaired their vehicles at least twice. Then, give a relational algebra query plan drawn as a tree that correctly computes this query. Question 2 Provide a graph and tree representation for the following case: Produce a wait-for-graph (WFG) for the following transaction scenario in a centralized database system. [3 marks] Transaction Data items locked by transaction Data items that transaction is waiting for T 1 x 2 x 1, x 3 T 2 x 3, x 10 x 7, x 8 T 3 x 8 x 4, x 5 T 4 x 7 x 1 T 5 x 1, x 5 x 3 T 6 x 4, x 9 x 6 T 7 x 6 x 5 Determine whether deadlock exists for the scenario above. [2 marks] Page 4 of 5
SECTION C ( 25 marks ) Provide a well formed explanation, description, or discussion. State any assumptions you might have to avoid overly lengthy answers. Answer only one (1) question. Only the first response will be marked. Question 1 a. Describe the different methods & tools that an end-user may use to interact with a data warehouse, briefly highlighting the primary purpose of each. b. Explain the interest in Data warehouses today? c. The term Big Data is trending today, compare and contrast the terms big data and data warehouse. d. It has been said that when producing a data model for a Data Warehouse, it is not so useful to go through the process of normalization and that in many cases achieving only First Normal Form is appropriate. Comment on these remarks showing reasons why such statements have been made. e. Explain the characteristics, associated techniques and typical applications for database segmentation. Question 2 Security is a major concern in database systems. a. Responsibility and Confidentiality are two concerns when dealing with data warehouse security, explain what these mean and why. b. Describe the two (2) firewall techniques. c. Using examples, discuss how Triggers can contribute to the security of a database, before and after a security breach. d. Describe two (2) mechanisms for guarding against SQL injection. e. Explain the SET (Secure Electronic Transactions) protocol. ----THE END--- Page 5 of 5