CS 4347 — Database Systems, Homework 6
What is the difference between pipelining and materialization? Explain with an example. Which method is preferred whenever feasible and why?
Pipelining converts every SQL query into a relational algebra expression (i.e. a sequence of relational operations). Materialization is instead creating, storing, and passing temporary results. Since the goal is to minimize the number of temporary files (writing and reading from these is expensive), pipelining is better whenever possible since it can combine several operations into one, which avoids writing unneccessary temporary files.
What is a database transaction? Discuss the atomicity, consistency, isolation, and durability (ACID) properties of a database transaction.
A database transaction is a logical unit of database processing that includes one or more access operations. These may include read or write operations. In other words, it is an executing program which forms a logical unit of database processing.
Every database transaction has some desirable properties for concurency control. Atomocity (meaning that the entire transaction is performed or not at all). Consistency preservation, where the database goes from one consistent state to another under the same commands. Isolation, in that other transactions run concurrently do not interfere with it, and durability, meaning that changes must persist in the database.
Which of the following schedules is (conflict serializable)? For each serializable schedule, determine the equivalent serial schedules.
This schedule is not conflict serializable because, because there is a cycle in the conflict graph.
Similarly, this schedule is not conflict serializable, because there is a cycle in the conflict graph.
Consider the three transactions T1, T2, and T3, and the schedule S1 below. Draw the serializability (precedence) graph for S1 and state whether the schedule is serializable or not. If the schedule is serializable, write down the equivalent serial schedule.
There is a cycle, so the schedule is not serializable.
An intern, an employee, and a supervisor are working at an astronomical observatory. The astronomical observatory has four levels of security. Unclassified is the weakest security. Confidential is th enext lefel of security. Secret is the next layer of security. The maximum level of security is Top Secret. The intern has unclassified clearance. The employee has secret clearance. And the supervisor has top secret clearance. \ The intern writes a report about the track of an asteroid in the night sky. The employee writes a report about the accuracy of the intern’s report. The supervisor writes a report that confirms the asteroid is going to strike the moon. \ From the set of employees: the Intern, the Employee, and the Supervisor.
Who can read the intern’s Report?
Everyone can read the intern’s report.
Who can read the supervisor’s report?
Only the supervisor can read the supervisor’s report.
Who can read the employee’s report?
The supervisor and other employees can read the employee’s report.