25 explain what a database transaction is and briefly

This preview shows page 23 - 31 out of 31 pages.

25. Explain what a databasetransactionis, and briefly outline the desirable ACIDproperties of database transactions — give thenameof the property that eachof the letters refers to, and give a 1–2 sentence description of what the propertymeans.[10 marks]SEE OVERDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201623.CITS140226. This question refers to the following table-creation statements that relate to auniversity’s research database.CREATE TABLE Project (number INT PRIMARY KEY,name TEXT,budget INT);CREATE TABLE Lecturer (number INT PRIMARY KEY,name TEXT);CREATE TABLE ChiefInvestigator (projectNumber INT,lecturerNumber INT,percentage INT,FOREIGN KEY (projectNumber) REFERENCES Project (number)ON UPDATE CASCADE ON DELETE CASCADE,FOREIGN KEY (lecturerNumber) REFERENCES Lecturer (number)ON UPDATE CASCADE ON DELETE RESTRICT );QUESTION 26 CONTINUES OVER THE PAGEDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201626 (Continued)(a) What is meant byreferential integrityin a database?(No more than twosentences.)24.CITS1402[3 marks](b) What does the phraseON UPDATE CASCADE ON DELETE CASCADEin the keyconstraint forprojectNumbermean in terms of maintaining referential in-tegrity?[2 marks]QUESTION 26 CONTINUES OVER THE PAGEDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201626 (Continued)25.CITS1402(c) The foreign key constraint forlecturerNumberis slightly different fromthe constraint forprojectNumberbecause it specifiesON DELETE RESTRICTrather thanON DELETE CASCADE. Explain what this differencemeans, bothin database terms, and what this implies about the “business rules” of theuniversity.[3 marks](d) Suppose that the rules specify that a chief investigator on any project mustspend at least 40% of their time on that project. Explain how instandardSQL this could be enforced by a simple addition toChiefInvestigatortable.[2 marks]SEE OVERDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201626.CITS1402Blank Page For WorkingSEE OVERDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201627.CITS1402Blank Page For WorkingSEE OVERDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201628.CITS1402Blank Page For WorkingSEE OVERDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201629.CITS1402Blank Page For WorkingSEE OVERDownloaded by Haotian Chen ([email protected])lOMoARcPSD|4596151
Semester 2 Supplementary/Deferred ExaminationsFebruary 201630.
End of preview. Want to read all 31 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
One
Professor
N/A
Tags
HaoTian Chen

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture