Securing Higher Grades Costing Your Pocket? Book Your Coursework Help at The Lowest Price Now!

  • +1-617-874-1011 (US)
  • +44-117-230-1145 (UK)
Online Customer Service

Database for Enterprise Sample Exam Questions

These are questions from more than one past exam paper.  There are more questions here than in the exam, so it is not a guide to the length of the final exam for this study period. It is also not a guide to the scope of the exam.

QUESTION 1

Consider the following execution schedule for transactions T1, T2 and T3:

r1(x) w2(y) w1(x) r2(x) r3(x) w3(z) w2(x) r1(z) r3(y)

  1. If timestamping is used for concurrency control and the timestamps for the transactions are in the order T1 < T2 < T3, are any transactions aborted? If so, explain what caused each abort.    [7]
  2. If strict 2-phase locking with lock escalation is used for concurrency control, are any transactions made to wait? If so, explain what caused each wait.  (Do not consider any subsequent actions for transactions put into waiting. [7]
  3. Use this example to comment on the difference between these two methods of concurrency control. [2]
  4. Draw the serialisability graph for the sequence of operations above. Based on the grah you draw, is the sequence serializable? [7]
  5. List the final writes of the sequence.

QUESTION 2

A multinational engineering company has decided to distribute its project management information at the regional level.  The global schema for the company is shown below.

EMPLOYEE     (empID, eName, salary, deptNo*, room, extension)
DEPARTMENT (deptNo, dName, dManagerID*, region)
PROJECT        (projNo, pName, price, pManagerID*)
WORKSON      (empID*, projNo*, totHours, active)

Primary keys are underlined, and foreign keys are marked with an asterisk (*).  EMPLOYEE contains employee details.  DEPARTMENT describes each department and dManagerID is the empID of the department manager.  PROJECT describes projects in the company and pManagerID is the empID of the project manager.  WORKSON shows the projects that employees work on: an employee can work on more than one project and a project can have more than one employee.

The regions where the fragments are to be distributed are Malaysia, Hong Kong and Australia.  Employees only work on projects in their own region (this is the same region as the project manager).  The Malaysian region is responsible for paying all employees, but does not need access to department-level details such as deptNo, room and phone extension for this purpose.  The time worked on each project by each employee is added every day to totHours in WORKSON.  The other relations are not often updated.

Design the fragmentation for the database using Relational Algebra for describing fragmentation conditions, and show the allocation of the fragments to the regions.                                                        [9]

QUESTION 3

Consider the relation fragments EMP-SITE1 stored at site 1 and DEP-SITE2 stored at site 2 with the contents shown below, and suppose that site 2 needs the natural join of EMP-SITE1 and DEP-SITE2.

EMP-SITE1

DEP-SITE2

EmpID

EName

DNum

Salary

DNum

DName

E001

Wang

D01

50000

D01

Administration

E002

Jones

D02

40000

D02

Production

E003

Nguyen

D03

45000

D03

Finance

E004

McDonald

D04

45000

E005

Papadopoulos

D05

45000

  1. Show the contents of the table that is the result of EMP-SITE1 NJ DEP-SITE2 (NJ represents a natural join). [1]
  2. Give an efficient way to accomplish this join by describing all query and data transfer operations needed at each site in the order in which they are performed. (Efficient means transferring the smallest number of data items between the sites.)  Your method must be one that would work in the general case, when you do not know the contents of either table.  You may use either relational algebra or SQL to describe the queries                                  [5]
  3. What is the difference in the number of data items transferred from one site to the other by your method compared with the method which sends all of EMP-SITE1 to site 2 to perform this query? [2]

QUESTION 4

  1. If strict 2-phase locking without lock escalation is used for concurrency control on the execution schedule shown below, are any transactions made to wait? If so, explain what caused each wait.  (Do not consider any subsequent actions for transactions put into waiting.)                                 [7]

r1(x) r2(x) w2(x) r1(y) r2(z) w2(z) w3(y) w3(z) w1(t) w4(t)

  1. Show how the single version timestamping method of concurrency control operates on the same execution schedule as in part a. Assuming that the timestamps for the transactions are in the order T1 < T2 < T3 < T4, are any transactions aborted?  If so, explain what caused each abort.     [7]
  2. Use this example and your results for parts (a) and (b) to compare these two methods of concurrency control. [2]

QUESTION 5

Consider the global relations STUDENT and SCHOOL of the database for the GoodResults University shown below.  The University has two campuses, City and Rural, and a Head Office that up to now has been the location of a centralised database that the campuses have had to access over a WAN.  The University has decided to distribute non-sensitive student information to the campus where they are studying to improve access to this information for campus staff.  The sites taking part in the distributed database are HO (Head Office), C (City) and R (Rural).

STUDENT (StudentID, Name, SchoolID*, EmailID, Address, Phone, DOB, Religion, GPA)
SCHOOL   (SchoolID, SchoolName, Campus, Phone, Secretary, Building, Office)

Primary keys are underlined, and foreign keys are marked with an asterisk (*). 

STUDENT contains data about students studying at the University.  Head Office staff frequently access all student information for all students, and STUDENT is often used in joins to other relations held at the HO site.  Campus staff frequently access the data of students who study at that campus, but they don’t need access to the data of students from another campus.  Once a student is enrolled at the University, their data is not often changed: their GPA is changed once a semester at HO, and their address and phone are changed occasionally either at HO or their campus.  Students study at the campus where their School is located.  The attributes DOB, Religion and GPA are considered private, and should only be available to Head Office staff.

SCHOOL contains information about Schools.  Each School is located at a single campus.  Queries on this relation are made by all University staff.  This relation is very seldom updated.

Design the fragmentation for STUDENT and SCHOOL and show the allocation of the fragments to sites HO, C and R.  You may use either relational algebra or SQL to describe the fragments.  [9 marks]

QUESTION 6

Consider the XML Schema file and sample XML data file shown below for the GoodResults University.

1. Write Schema statements for the following requirements. [8]

  1. Declare SchoolID as a key for SCHOOL_TABLE.
  2. Declare SchoolID in STUDENT as a reference to SchoolID in SCHOOL_TABLE.
  3. Ensure that Campus in SCHOOL is either ‘C’ or ‘R’.
  4. Ensure that GPA in STUDENT is a string with the format ‘n.m’, where n is a digit between 0 and 7, and m is a digit between 0 and 9. (It is not necessary to ensure that the GPA is never more than ‘7.0’).

2. Write a query using XQuery syntax that will return the names and GPA for all students in Schools whose Campus = ‘C’. [6]

Schema file for

Question 6

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

<!--Sample Schema file for DB Technology exam SP5 2006 -->

<xs:element name = "GRU_DB">

    <xs:complexType>

        <xs:sequence>

            <xs:element name = "STUDENT" type = "STUDENTTYPE"

                        minOccurs = "0" maxOccurs = "unbounded" />

            <xs:element name = "SCHOOL"  type = "SCHOOLTYPE"

                        minOccurs = "0" maxOccurs = "unbounded" />

        </xs:sequence>

    </xs:complexType>

</xs:element>

<!-- Definition of table types -->

<xs:complexType name = "STUDENTTYPE">

    <xs:sequence>

        <xs:element name = "StudentID" type = "xs:string" />

        <xs:element name = "Name" type = "xs:string" />

        <xs:element ref = "SchoolID" />

        <xs:element name = "EmailID" type = "xs:string" />

        <xs:element name = "Address" type = "xs:string" />

        <xs:element name = "Phone" type = "xs:string" />

        <xs:element name = "DOB" type = "xs:date" />

        <xs:element name = "Religion" type = "xs:string" />

        <xs:element name = "GPA" type = "xs:string" />

    </xs:sequence>

</xs:complexType>

<xs:complexType name = "SCHOOLTYPE">

    <xs:sequence>

        <xs:element ref = "SchoolID" />

        <xs:element name = "SchoolName" type = "xs:string" />

        <xs:element name = "Campus" type = "xs:string" />

        <xs:element name = "Phone" type = "xs:string" />

        <xs:element name = "Secretary" type = "xs:string" />

        <xs:element name = "Room" type = "xs:string" />

    </xs:sequence>

</xs:complexType>

<!-- Definition of referenced elements -->

<xs:element name = "SchoolID" type = "xs:string" />

<!-- End of schema -->

</xs:schema>

Sample XML file exam.xml for Question 6

<?xml version="1.0" encoding="UTF-8"?>

<!--Sample XML file for DB Technology exam SP5 2006 -->

<GRU_DB xsi:noNamespaceSchemaLocation="sample.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <STUDENT>

        <StudentID>M1234</StudentID>

        <Name>Susan Jones</Name>

        <SchoolID>CIS</SchoolID>

        <EmailID>jonsy001</EmailID>

        <Address>2 Smith Street, Smithtown North</Address>

        <Phone>0149999997</Phone>

        <DOB>1980-01-07</DOB>

        <Religion>Buddhist</Religion>

        <GPA>6.2</GPA>

    </STUDENT>

    <SCHOOL>

        <SchoolID>CIS</SchoolID>

        <SchoolName>Computer and Information Science</SchoolName>

        <Campus>C</Campus>

        <Phone>81111111</Phone>

        <Secretary>Michael</Secretary>

        <Room>D2-99</Room>

    </SCHOOL>

</GRU_DB>

QUESTION 7

a. Suppose a scheduler that uses strict 2-phase locking without lock escalation is presented the operations for transactions T1, T2, T3 and T4 and data items x, y, z and t in the order shown below: r1(x) means T1 reads x, and w2(y) means T2 writes y.

r1(x) r2(y) w2(y) r1(t) r3(z) w3(z) r2(z) w2(z) r4(t) r1(z)

Describe the locking and unlocking behavior of the scheduler, and say if any transactions are made to wait.  Do not consider any subsequent actions for transactions that are made to wait, and do not release locks held by waiting transactions.  Assume that a transaction commits immediately after its last read or write action                                  [6]

b. Suppose the single version timestamping method of concurrency control is used on the same execution schedule as in part a. Using the values 1, 2, 3 and 4 for the timestamps for T1, T2, T3 and T4 respectively, record in the table the test and response for each operation, and the changes made to the counters WTM and RTM for x, y, z and t.  Briefly explain what happens during the execution of the schedule in the space below the table.  Use 0 for the initial values for RTM and WTM for x, y, z and t, to indicate that they have values before the timestamp for T1.                                           [6]

c. Use your results for parts (a) and (b) to compare these two methods of concurrency control. [2]

QUESTION 8

Consider the global relations APARTMENT, OWNER, and RENTER of the database for the BestRents Company shown below.  Attributes forming primary keys are underlined.  OwnerID in APARTMENT is a foreign key referencing OwnerID in OWNER, and ApartmentID in RENTER is a foreign key referencing ApartmentID in APARTMENT.

APARTMENT (ApartmentID, Address, Rent, Site, OwnerID)
OWNER         (OwnerID, Name, Phone, Address, BankAccount)
RENTER        (RenterID, Name, ApartmentID, Phone)

The company rents apartments managed from three sites, Seaside, Central and Rural.  The Central site has the added responsibility of transferring rental payments to the owners’ bank accounts.  Currently the database is located at Central, and Seaside and Rural access it over a WAN.  The company has decided to install DBMSs at Seaside and Rural, and distribute data to each of the three sites to improve access for staff managing apartments at Seaside and Rural.

APARTMENT contains data about the apartments.  Site contains the name of the site managing the apartment, and OwnerID contains the ID of the apartment’s owner.  Local access to all apartment details is required by staff at Central, as well as at the managing site.

OWNER contains information about the owners of the apartments.  Local access to attributes OwnerID, Name and Phone is required at the site managing the apartment as well as at Central, but only Central should have local access to the owner’s Address and BankAccount.  Owners can own many apartments, and they may not all be managed at the same site.

RENTER contains information about the renters of the apartments.  Local access to renter details is only required at the site that manages the renter’s apartment.

Design a minimal, complete, and restorable fragmentation for APARTMENT, OWNER and RENTER and show the allocation of the fragments to sites Central, Seaside and Rural.  You may use either relational algebra or SQL to describe the fragments.                                                                            [10]

QUESTION 9

Consider the fragmentation and allocation shown below for part of the distributed database for the University of Antarctica Intercampus Competition.  SL, SJ and PJ represent the relational algebra operations selection, semi-join, and projection respectively.  The sites are Mawson (M), South Pole (S), and Casey (C).  Attributes forming primary keys are underlined.  SocietyID in COMPETITOR is a foreign key referencing SocietyID in SOCIETY.

SOCIETY            ( SocietyID, SocietyName, Contact, SocietyType )

COMPETITOR   ( SocietyID, MemberID )

SOCIETY

M

S

C

SOCIETY_M

SLSocietyType = ‘water’ (SOCIETY)

Y

SOCIETY_S

SLSocietyType = ‘indoor’ (SOCIETY)

Y

Y

SOCIETY_C

SLSocietyType = ‘land’ (SOCIETY)

Y

Y

COMPETITOR

M

S

C

COMPETITOR_M

COMPETITOR SJ SOCIETY_M

Y

COMPETITOR_S

COMPETITOR SJ SOCIETY_S

Y

Y

COMPETITOR_C

COMPETITOR SJ SOCIETY_C

Y

Y

Write a PL/SQL procedure to be run at Casey that will take a MemberID as input and list the SocietyName for every indoor society (i.e., the societies that are competing at South Pole) for which that member is a competitor.

For full marks, the queries in your procedure must be as efficient as possible.  Say whether each of the queries in your procedure runs locally, remotely at a single site, or distributed between more than one site.  Explain the network traffic for your any distributed queries in your procedure, i.e. what data will be sent, and the sites it will travel between            [5]

University of Antarctica Intercampus Competition Database Description

The University of the Antarctic has three Campuses, one in Mawson, one in Casey and one at the South Pole.  The administration of the Student Association of the University of the Antarctic (SAUA), which runs a number of sport and recreation societies for University employees and students, is based in Mawson.  A distributed database has been created for an Intercampus Competition.  Each campus will be hosting part of the Competition:  South Pole will host the indoor activities such as chess, badminton and debating, Casey will host the land based outdoor activities such as orienteering and ice hockey, and Mawson will host the water based activities such as swimming, diving and water polo.

Competitors must all be current members of the SAUA.  Competitors represent their own campus: a Chess Club competitor whose campus is Mawson will play for the Mawson Chess Club team.  To allow members to take part in activities at more than one campus, the Competition will be held over 3 weeks, the first week at South Pole, the second at Casey and the third at Mawson.

Global Schema

MEMBER contains details of SAUA members, CAMPUS contains details about each campus, SOCIETY contains details of the clubs and societies, COMPETITOR contains details of the members who will be competing, and ACCOMMODATION contains details of accommodation booked for competitors.

Note that some relations not used in this exam are omitted from this description.

MEMBER (MemberID, FamilyName, GivenNames, Address, Phone, MemberType, CampusName)

SOCIETY (SocietyID, SocietyName, Contact, SocietyType)

COMPETITOR (SocietyID, MemberID)

ACCOMMODATION (MemberID, CampusName, Hotel, Phone, ArrivalDate, DepartureDate)

The keys are underlined.  The attributes and foreign keys are described below:

relation

foreign key

references

SOCIETY

Contact

MEMBER

COMPETITOR

SocietyID

SOCIETY

COMPETITOR

MemberID

MEMBER

ACCOMMODATION

MemberID

MEMBER

MEMBER

MemberID

Unique identifier for the member

FamilyName

Member’s family name

GivenNames

Member’s given names

Address

Member’s address

Phone

Member’s phone number

MemberType

One of “student”, “employee” or “both”

CampusName

One of “South Pole”, “Mawson” or “Casey”

SOCIETY

SocietyID

Unique identifier for the club or society

SocietyName

Name of the club or society

Contact

SAUA MemberID for the contact person for the society

SocietyType

One of “indoor”, “land” or “water”

COMPETITOR

SocietyID

Club or society the competitor is competing for

MemberID

MemberID of the competitor

ACCOMMODATION

MemberID

MemberID of the competitor who has booked the accommodation

CampusName

Name of campus where the hotel is located

Hotel

Name of hotel where member will stay

Phone

Phone number for the hotel

ArrivalDate

Date when competitor will arrive

DepartureDate

Date when competitor will leave

QUESTION 10

Consider the fragments of the University of Antarctica Intercampus Competition database shown below.  Attributes forming primary keys are underlined.

COMPETITOR_S ( SocietyID, MemberID )

ACCOMMODATION_S ( MemberID, CampusName, Hotel, Phone, ArrivalDate, DepartureDate )

Write an insert on COMPETITOR_S trigger that runs at South Pole that checks whether the competitor with that MemberID has accommodation booked at South Pole, and if not, displays the message

‘No accommodation booked’ [5]

QUESTION 11

Suppose the relations INSTRUCTOR (InstructorID, Name, Salary, Branch) and LESSON (InstructorID, ClientID, LessonDate, LessonTime, VehicleID) for the GoodResults Driving School have been implemented as an XML database.  An XML Schema file and a sample XML data file are given after the question.

a. Write Schema statements for the following requirements. [8]

  1. Declare InstructorID as the key for the INSTRUCTOR element.
  2. Declare InstructorID in LESSON as a foreign key referencing InstructorID in INSTRUCTOR.
  3. Ensure that Branch in the INSTRUCTOR element is one of “North”, “South”, or “West”.
  4. Ensure that ClientID in the LESSON element has the format Cnnnn (i.e. a string beginning with C and followed by 4 digits, for example C0289).

b. Write a query using XQuery syntax that will return the names of all instructors who have lessons on 2007-06-30. [6]

Schema file for Question 11

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

<!-- DriveWell School of Motoring Database -->

<xs:element name = "exam">

    <xs:complexType>

        <xs:sequence>

            <xs:element name = "LESSON" type = "LESSONTYPE" minOccurs="0"

                 maxOccurs="unbounded"/>

            <xs:element name = "INSTRUCTOR"  type = "INSTRUCTORTYPE"

                 minOccurs="0" maxOccurs="unbounded"/>

        </xs:sequence>

    </xs:complexType>

</xs:element>

<!-- Definition of table types -->

<xs:complexType name = "LESSONTYPE">

    <xs:sequence>

        <xs:element ref = "InstructorID" />

        <xs:element name = "ClientID" type = "xs:string" />

        <xs:element name = "LessonDate" type = "xs:date" />

        <xs:element name = "LessonTime" type = "xs:time" />

        <xs:element name = "VehicleID" type = "xs:string" />

    </xs:sequence>

</xs:complexType>

<xs:complexType name = "INSTRUCTORTYPE">

    <xs:sequence>

        <xs:element ref = "InstructorID" />

        <xs:element name = "Name" type = "xs:string" />

        <xs:element name = "Salary" type = "xs:decimal" />

        <xs:element name = "Branch" type = "xs:string" />

    </xs:sequence>

</xs:complexType>

<!-- Definition of reference elements -->

<xs:element name = "InstructorID" type = "xs:string" />

<!-- End of schema -->

</xs:schema>

Sample XML file exam.xml for question 11

<?xml version="1.0" encoding="UTF-8"?>

<!-- Sample XML file for DB Tech Exam, SP2 2007 -->

<exam xsi:noNamespaceSchemaLocation="q6file.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <LESSON>

        <InstructorID>I091</InstructorID>

        <ClientID>C0289</ClientID>

        <LessonDate>2005-11-26</LessonDate>

        <LessonTime>10:00:00</LessonTime>

        <VehicleID>UMD999</VehicleID>

    </LESSON>

    <INSTRUCTOR>

        <InstructorID>I091</InstructorID>

        <Name>Mary Jones</Name>

        <Salary>58000</Salary>

        <Branch>North</Branch>

    </INSTRUCTOR>

</exam>

QUESTION 12

Consider the fragmentation and allocation shown below for part of the distributed database for the Red Cross Application

Write a PL/SQL procedure to be run at the HQ site for a transaction that will find all the donations that followed from interviews made by interviewer Judy Jetson and list their donationDate and donationType.  You can assume that there will be at least one such donation at each clinic, and that Judy Jetson is in the STAFF_INTERVIEWER fragment.

For full marks, the queries in your procedure must be as efficient as possible.  Say whether each of the queries runs locally, remotely at a single site, or distributed between two or more sites.  Explain the network traffic for any distributed queries in your procedure, i.e. what data will be sent, and the sites it will travel between.   [9]

Red Cross Database Description

Note that some relations not used in this exam are omitted from this description.

STAFF            ( staffID, name, address, phone, DOB, position, TFN, salary )

INTERVIEW   ( staffID, date, time, clinic, donorID, BP, HG, heartRate, result, donationID )

DONATION    ( donationID, donationDate, donorID, donationType, bloodGroup, size )

The keys are underlined.  Foreign keys are: donorID in APPOINTMENT, DONATION and INTERVIEW all refer to DONOR(donorID), staffID in INTERVIEW refers to STAFF(staffID), and donationID in INTERVIEW refers to DONATION(donationID).  The attributes are described below.

STAFF

staffID

Unique identifier for staff member.

name

Name of staff member.

address

Address of staff member.

phone

Phone number of staff member.

DOB

Date of birth of staff member.

position

One of 'nurse', 'interviewer' or 'clerical'.

TFN

Tax file number of staff member.

salary

Salary of staff member.

INTERVIEW

date

Date of interview.

time

Time of interview.

clinic

Either 'City' or 'Mobile'.

staffID

Identifies the interviewer.

donorID

Identifies the donor.

BP

Blood pressure of donor.

HG

Haemoglobin level of donor.

heartRate

Heart rate of donor.

result

Either 'donation' or 'failed check'.

donationID

Identifies the donation if result is ‘donation’.  NULL if result is ‘failed check’.

DONATION

donationID

Unique identifier for donation.

donationDate

Date of donation.

donorID

Identifies the donor.

donationType

One of 'whole', 'plasma' or 'platelets'.

bloodGroup

Blood group of donor if donationType is 'whole' or 'platelets'.  Null if blood type is 'plasma'.

size

Size of the donation in ccs.

Distributed design

STAFF

Fragment

Definition

HQ

City

Mobile

 STAFF_PRIVATE

 PJstaffID, address, DOB, TFN, salary (STAFF)

Y

 STAFF_PUBLIC

 PJstaffID, name, phone, position (STAFF)

 STAFF_NURSE

 SLposition = 'nurse' (STAFF_PUBLIC)

Y

Y

Y

 STAFF_INTERVIEWER

 SLposition = 'interviewer' (STAFF_PUBLIC)

Y

Y

Y

 STAFF_CLERICAL

 SLposition = 'clerical' (STAFF_PUBLIC)

Y

Y

INTERVIEW

Fragment

Definition

HQ

City

Mobile

 INTERVIEW_CITY

 INTERVIEW SJ DONOR_CITY

Y

 INTERVIEW_MOBILE

 INTERVIEW SJ DONOR_MOBILE

Y

DONATION

Fragment

Definition

HQ

City

Mobile

 DONATION

Y

Y

Y

QUESTION 13

Consider the fragmentation and allocation shown above for part of the distributed database for the Red Cross application

Write an update of phone on STAFF_NURSE trigger at the HQ site that makes the same change to STAFF_NURSE at the City and Mobile sites. [6]

QUESTION 14 (Short answer questions) 2 marks each

Explain the difference between a database and a data warehouse

Explain the difference between sequential tuple organization and hash tuple organization

Explain the difference between hash and index when they are used to retrieve tuples.

QUESTION 15

1. Which statement below is incorrect?

  1. Data mining is a process that supports the operation of a data warehouse.
  2. Data mining is a process that uses the data in a data warehouse.
  3. Drill down is an operation of data mining.
  4. Roll up is an operation of data mining.

2. What is correct about a B+ tree?

  1. A node of a B+ tree can have only one key value and two children as B stands for binary.
  2. The attribute for which a B+ tree is built is called an index key and an index key can be different from the primary key.
  3. The attribute for which a B+ tree is built must be the primary key attribute.
  4. A B+ tree stores the whole tuples of the table on its leaf nodes to help improve the search performance.

3. Which is a correct line in the DTD for the following XML document?

<?xml version="1.0"?>

<!DOCTYPE note SYSTEM "note.dtd">

<note id="1">  

     <to>Jill</to>  

     <from>Jani</from>

     <heading>Lift to Uni tomorrow?</heading>

     <body>

          Call me if you can take me. I must be there by 10am.  

     </body>

</note>

  1. <!ELEMENT id (#CDATA)>
  2. <!ELEMENT id (ID)>
  3. <!ELEMENT note ID (id) #REQUIRED>
  4. <!ATTLIST note id ID #REQUIRED>

4. Consider this XML document. Which of the statements below is true?

<?xml version="1.0"?>

<!DOCTYPE note SYSTEM "note.dtd">

<note id="1">

   <to>Jill</to>

   <from>Jani</from>

   <heading>Lift to Uni tomorrow?</heading>

   <body>

        Call me if you can take me. I must be there by 10am.

    </body>

</note>

  1. It is not valid because id="1" should be ID="1".
  2. It is not well-formed because <body> spreads in multiple lines.
  3. We cannot tell if it is valid because we do not know what is in note.dtd
  4. It is not well-formed because "<!".

5. Given the sequence of operations below, using timestamping for concurrency control, which transaction is the first to be aborted? 

r3(x) r4(z) w1(x) r3(y) r3(x) w1(y) w4(x) w1(z) r4(y) w3(x) r4(z)

  1. T4
  2. None
  3. T3
  4. T1

6. What is the aim of identifying whether a schedule is serialisable? 

  1. for backup
  2. for committing
  3. for isolation 
  4. for locking

7. Which of these statements about triggers is TRUE?

  1. You can refer to the old and new values of the changed row in the body of a row level trigger whose triggering event is update.
  2. You can refer to the old-table and new-table states of the target table in the body of a statement level trigger.
  3. In a before trigger you can only access the old value of the deleted row if the trigger is of the statement level.
  4. In a before trigger you can only access the new value of the inserted row if the trigger is of the statement level

8. Given the tables and the trigger below, what causes the trigger to fire?

  1. update to change column dept of table t1
  2. upadte to change column name of table t1
  3. update to change column numstaff of table t2
  4. update to change column depNum of table t2

9. Which of these statements about fragmentation is FALSE?

  1. Each data item in the global relation must appear in at least one fragment.
  2. In vertical fragmentation, primary key attributes must appear in every fragment.
  3. In horizontal fragmentation, a fragment has a different schema from the global relation.
  4. In horizontal fragmentation, no tuples (rows) can appear in more than one fragment.

10. Given the global table schemas below, which fragmentation expression defines the fragment that contains the students of the schools in Mawson Lakes?

  1. select * from student where school in (select schoolid from school where campus='MLK');
  2. select * from school where campus='MLK';
  3. select * from student where campus='MLK';
  4. select * from student join school on school=schoolid and campus='MLK';

11. Which of these statements about a data warehouse is true?

  1. It is a database with a specific purpose.
  2. It is HDFS.
  3. It is a key-value pair store.
  4. It is a database for managing transactions.

12. Which of these statements about Hadoop is true?

  1. map() is a part of q query.
  2. shuffler is a part of a query.
  3. map() runs on the name node.
  4. shuffler is part of map().

13. Which of these statements about Hbase is true?

  1. Hbase is HDFS
  2. Hbase is an SQL database.
  3. Hbase can be used to store data of an SQL database
  4. Hbase works in the same way as Hadoop

14. Which of these statements about Elasticsearch (ES) is true?

  1. ES is HDFS.
  2. ES is Hbase.
  3. ES is a B+ tree.
  4. ES is on a set of indexes.

15. Which of these statements about query optimization is true?

  1. It requires the user to rewrite queries.
  2. It may use indexes to improve the execution efficiency.
  3. It may use Hbase to make the query executed more efficiently.
  4. It may use a distributed system to run the query more efficiently.
Want answer for this Assignment
Tap to Chat
Get Instant Assignment Help
Tap to Chat
Get Instant Assignment Help