You are on page 1of 36
Stes ot Office Use Only Sect B Q5 | Sect B Q6 ] Section A_| Sect B Qi Monash University Semester Two Examination Period 2012 iii Lieeuey Faculty of Information Technology Mh Unni EXAM CODES: FIT1004 TITLE OF PAPER: Data Management EXAM DURATIOI 3 hours writing time READING TIME: 10 minutes THIS PAPER IS FOR STUDENTS STUDYING AT:( tick where applicable) I Berwick [I Clayton &] Malaysia ‘BJ Off Campus Learning O Open Learning O Caulfield G Gippsland O Peninsula {&) Enhancement Studies [] Sth Africa O Pharmacy O Other (specify) 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 yout 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. No examination papers are to be removed from the room. Aitempt all questions. All answers must be printed neatly on this paper. Answer questions with concisely expressed factual information, The backs of pages in this paper may be used for any rough work. Any material written on the backs of pages will not normally be marked. [fan answer needs to overflow from its designated answer space to a blank page, clearly indicate that this is the case and that the material on the blank page is for correction. This paper must be handed up at the end of the examination, even if no questions are attempted. The marks for each question are shown. Total marks for the examination: 100. This exam counts as 50% of the final assessment for the unit AUTHORISED MATERIALS CALCULATORS O yES B® NO OPEN BOOK O YES No SPECIFICALLY PERMITTED ITEMS {2 YES BNO Candidates must complete this section STUDENT ID _ DESK NUMBER Page 1 of 36 ‘This page may be used for any rough work. Material written on this page will not be marked uniess there is a clear indication that written material on this page shouid be included in the answer. Page 2 of 36 Section A: Multiple Choice Section This section is worth 10 marks. Each question is worth 0.5 mark. Mark your selection by placing a or aX through your selected answer for example * % Ifyou change your selection during the review of your paper, prior to the end of the Examination, make sure that the alteration is clear. Note: There is only ONE correct answer for each question. Multiple Choice Identify the choice that best completes the statement or answers the question. 1. are important because they help to ensure data integrity. a. Attributes c. Relationships b. Entities 4. Constraints 2. A___key can be described as a superkey without unnecessary attributes, that is, a minimal superkey. a. secondary ©. primary b. candidate d. foreign 3. A(n)__join returns not only the rows matching the join condition (that is, rows with matching values in the common columns) but also the rows with unmatched values. a. equi- c. inner b. cross d. outer 4. The statement SELECT * FROM TI, T2 produces a(n) ___join. a. cross ¢. natural b. full d. equi- 5. Assume you are using the UNION operator to combine the results from two tables with identical structure, CUSTOMER and CUSTOMER 2. The CUSTOMER table contains 10 rows, while the CUSTOMER 2 table contains 7 rows. Customers Dunne and Olowski are included in the CUSTOMER table as well as in the CUSTOMER _2 table. How many records are returned when using the UNION operator? a 7 ec. 1S b. 10 d. 17 6. In subquery terminology, the first query in the SQL statement is known as the query. a. outer c. inner b. left d. base 4 When you issue the DELETE FROM tablename command without specifying a WHERE condition, _. a. no rows will be deleted c. the last row will be deleted b. the first row will be deleted d._all rows will be deleted Page 3 of 36 ‘This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 4 of 36 8. In Oracle, _ make(s) 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. a. triggers c. embedded SQL b. indexes d. procedural SQL 9. A(n)___lock exists when concurrent transactions are granted read access on the basis of a common lock. a. shared c. binary b. exclusive d. two-phase 10. A(n)___ phase in a two-phase lock is when a transaction releases all locks and cannot obtain any new lock. a. growing c. tocking b. shrinking d. unlocking 11. A(n)__ condition oceurs when two or more transactions wait for each other to unlock data. a. deadlock ©. binary lock b. exclusive lock d. two-phase lock 12. means that data used during the execution of a transaction cannot be used by @ second transaction until the first one is completed. a. Serializability c. Isolation b. Atomicity d. Time stamping 13. Overlapping subtypes are subtypes that contain __ subsets of the supertype entity set. a. entity c. unique b. subtypes d. nonunique 14. When the PK of one entity does not contain the PK of a related entity, the relationship is a. missing ©. strong b. weak d, neutral 15, Anentity is said to be__-dependent if it can exist in the database only when it is associated with another related entity occurrence. a. existence ©. business b. relationship d. weak 16. 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 Page 5 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 6 of 36 17. Ina(n) diagram, the arrows above the attributes indicate all desirable dependencies. a. Chen c. functionality b. dependency d. ER 18. A table that is in 2NF and contains no transitive dependencies is said to be in__. a. INF c. SNF b. 2NF d. 4NF 19. Dependencies based on only a part of a composite primary key are called dependencies. a. primary ¢. incomplete b. partial d. composite 20. A(n)__ exists when there are functional dependencies such that Y is functionally dependent on X and Z is functionally dependent on Y, and X is the primary key. a. partial dependency c. atomic attribute b. repeating group 4. transitive dependency [20 x 0.5 = 10 marks) Page 7 of 36 This page may be used for any rough work. Material written on this page wil! not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 8 of 36 Section B: Short Answer Section This section is worth 90 marks. Question 1 Formats, metadata and data quality (10 marks) The following table contains samples of data records from an environmental study. Scientists plan to combine this dataset with datasets from other studies to produce a geographic survey of environmental conditions, However, several issues need to be resolved before this can be done. Location | CO2__| Methane | Temperature | Population | Land use| Environment Farina 195 | 123 304 19 Farming | Desert South Footrot [23.7 | 39.4 19.4 23 Farming | Wet Flats Temperate Bedrock | 31.9 | 18.7 215 317 Urban Dry L ‘Temperate (a) What issues might arise when combining the classifications listed here for land use and environment with values drawn from independent studies elsewhere? How could the problem be overcome? [3 marks] (b) What issues of quality might arise for the data entries for the quantitative attributes (C02, Methane, Temperature, and Population)? [3 marks) Page 9 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 10 of 36 (0) List any four items of essential metadata that would be required about the dataset as a whole and briefly explain what each item means in this case. [4 marks} [3 +3 +4=10 marks] Page 11 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that writien material on this page should be included in the answer. Page 12 of 36 Question 2 Entity Relationship Modelling (20 marks) “Martial Arts R Us" (MARU) needs a database. MARU is a martial arts school with hundreds of students. It is necessary to keep track of all the different classes that are being offered, who is assigned to teach each class, and which students attend each class. Also, it is important to track the progress of each student as they advance The MARU database must satisfy the following requirements: * Students are given a student number when they join the school. This is stored along with their name, date of birth, and the date they joined the school. * Allinstructors are also students, but clearly, not all students are instructors. In addition to the normal student information, for each instructor, the date that they start working as an instructor must be recorded, along with their instructor status (paid or volunteer). * An instructor may be assigned to teach any number of classes, but each class has one and only one assigned instructor. Some instructors, especially volunteer instructors, may not be assigned to any class. + Aclass is offered for a specific level at a specific time, day of the week, and location, For example, one class taught on Mondays at 5:00 pm in Room #1 is an intermediate-level class. Another class taught on Mondays at 6:00 pm in Room #1 is a beginner-level class. A third class taught on Tuesdays at 5:00 pm in Room #2 is an advanced-level class. A session for each class is offered at the same day, time and location every week. + Students may attend any class of the appropriate level during each week so there is no expectation that any particular student will attend any particular class session. Therefore, the actual attendance of students at each individual class session must be tracked. + Astudent will attend many different class sessions; and each class session is normally attended by many students. Some class sessions may have no students show up for that session. New students may not have attended any class sessions as yet. + Atany given session of a class, instructors other than the assigned instructor may show up to help. Therefore, a given class session may have several instructors (a head instructor and many assistant instructors), but it will always have at least the one instructor that is assigned to that class. For each class session, the date that the class was taught and the instructors’ roles (head instructor or assistant instructor) need to be recorded. For example, Mr. [ones is assigned to teach the Monday, 5:00 pm, intermediate class in Room #1. During one particular session of that class, Mr. Jones was present as the head instructor and Ms. Chen came to help as an assistant instructor. + Each student holds a rank in the martial arts. The rank name, belt color, and rank requirements are stored. Each rank will have numerous rank requirements, Each requirement is considered a requirement just for the rank at which the requirement is troduced. Every requirement is associated with a particular rank. All ranks except white belt have at least one requirement. A given rank may be held by many students. While it is customary to think of a student as having a single rank, jt is necessary to track each student’s progress through the ranks. Therefore, every rank that a student attains is kept in the system. New students joining the school are automatically given a white belt rank. The date that a student is awarded each rank should be kept in the system, All ranks have at least one student that has achieved that rank at some time, Create a relational Logical Model to represent the data requirements described above for MARU. Your model must + Include all necessary attributes, and * Name all relationships. [20 marks] Page 13 of 36 This page may be used for any rough work, Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 14 of 36 “Martial Arts R Us" (MARU) ~ Logical Model Diagram Page 15 of 36 ‘This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 16 of 36 Question 3 Logical Model and the SQL Create Table Statement (10 marks) (a) A unit of study may require other units as a prerequisite (ie. a unit, which must be successfully completed before the unit can be studied). A given unit may require no, one or more prerequisite units. For example FIT2027 Systems Design and Implementation (6 points) has prerequisite units of FIT1002 Computer Programming (6 points), FIT1004 Data Management (6 points) and FIT2001 Systems Development (6 points). FIT1002 and FIT1004 have no prerequisites. FIT2001 has a prerequisite of FIT1004. An ERD to represent this situation is shown below: Convert the conceptual ERD above into a logical model {5 marks] Page 17 of 36 e may be used for any rough work, written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 18 of 36 (b) Using the logical model you designed for part (a), write the SQL schema to implement this under Oracle. The unit points must be 6, 12, 18 or 24. Your schema should include primary key definition/s, as well as appropriate referential integrity references and appropriate column check/s and make use of named constraints. [5 marks] [5 +5 =10 marks} Page 19 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 20 of 36 Question 4 Normalisation (10 marks) The following shows the list of products in a shipment of a company - AppPro. Note that the Shipment Num is only unique for each warehouse of AppPro. AppPro Shipping Docket Warehouse ID: Warehouse Location: Shipment Num: Date of Order: 3 Seaford 6 3 Sep 2012 Warehouse Type: Warehouse Manager: Date Shipped: arge ___| Tommy Stark (Employee ID 15) 4 Sep 2012 Shipping Type: Package Description: Air Fragile, handle with care Shipping Address: ‘Attention: iCom Pepper Potts 822, Queens St Melboume, Victoria 3000 Product 1D Product Name Quantity ‘Weight (kg) 20 ‘Apple MacBook Pro 15” 3 2.49 (7.47 total) 87 Apple Time Capsule 2 1.6 (3.2 total) 967 Apple MacBook Air 1 1.36 (1.36 total) Convert the information shown above to Third Normal Form (3NF), showing each stage (ftom Unnormalised form to 3NF) of the process. Clearly state any assumptions that you make, Use only attributes shown above, Do not add any new ones, Page 21 of 36 age may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 22 of 36 Normalisation UNF 3NE [2+2+4+2=10 marks] Page 23 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 24 of 36 Question 5 SQL (30 marks) Booklet B shows the logical model for part of the record system of a publication database. Also provided is the schema file for creating the database structure. Booklet B also provides a summary of SQL Functions available under Oracle. Using SQL, write commands to provide the following reports or operations for the database. (a) List the Title and ISBN for every book in the database. (b) Define 2 sequence authorNumber that can provide ID numbers for new authors starting from 1000 and increasing by 10. (©) Using the above sequence authorNumber to provide an id number, add a record for the Australian author Jane Smith, born on 25 June 1970. (4) The entries for some authors are missing their nationality. Replace these null values with the words 'NOT KNOWN’. Page 25 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there i: written material on this page should be included in the answer. clear indication that Page 26 of 36 (e) Using the headings "Family Name", “Personal Name", "Age" list all Australian authors in order of their birthdate. (f) List every book published before 2000 in descending chronological order, using the headings YEAR, TITLE, ISBN (g) List all the authors who have had books published by Penguin Page 27 of 36 This page may be used for any rough work. Material written on this page will not be marked waless there is a clear indication that written material on this page should be included in the answer. Page 28 of 36 (h) For every author, provide a list of the titles of all their books that have been published. Note that new authors will not yet have had any books published. Display the output in book title order within author surname order. (i) Print a list of all books written by Australian authors. The list is needed for the reference section of a report and should be in the required format, as per the following example: Smith, J. (2012). Adventures with SQl. Farina Publishing, Melbourne. Gi) For each author, list their surname and the number of books they have published. Page 29 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 30 of 36 (Kk) Which genre has had the most books published? wo Provide a list of all the editors who have not edited a book written by Jane Smith. (m) — Create a view calied jSmith_vu so that the author Jane Smith, whose author ID is 1020, can see details of all her books, showing YEAR, TITLE, ISBN, and PUBLISHER. [242+24+24+3434+2424+34+2+2+2+3 =30 marks] Page 31 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 32 of 36 Question 6 Transaction Management (10 marks) (a) The following schedule represents a sequence of events in an interleaved execution of a set of transactions (T1,12,13,74,) which are manipulating data items (X,Y.Z): Ti |X) fr Trey) 13 |Z) TI | wx) T4__|rY) T4 | (X) 2 | wiz; Ta | wy) _| Assuine that a READ (1) acquires an $ lock and an WRITE (w) acquires an X lock or promotes an $ lock to an X lock. Also assume that no locks are released during the execution of these events. i.) Draw a wait-for graph to show which transactions are waiting for which transactions afier these events have executed. ii.) What is deadlock? iii.) Based on your wait-for-graph in (i) is deadlock present? Explain your answer. [3+ 1+1=5 marks] Page 33 of 36 This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indi written material on this page should be included in the answer. Page 34 of 36 b) The database recovery process involves bringing the database to a consistent state after failure, Transaction recovery procedures generally make use of the deferred-write and weite-through techniques. Describe how each one of these two techniques works and uses the transaction log to restore the database to a consistent state. [5 marks] [5+5=10 marks] END OF EXAMINATION QUESTIONS Page 35 of 36 ‘This page may be used for any rough work. Material written on this page will not be marked unless there is a clear indication that written material on this page should be included in the answer. Page 36 of 36

You might also like