CP5520 Advanced Databases and Applications Assignment

Assignment Help Database Management System
Reference no: EM132446280

CP5520 - Advanced Databases and Applications - James Cook University

Transaction Processing

Consider schedules S1 and S2 below.

S1: r3(X), r3(Z), r1(Y), r1(X), w3(Z), r2(Y), w1(X), r2(X), w2(X), r1(Z), w1(Z), r2(Z), w2(Y)
S2: r2(X), r3(Y), r2(Z), w3(Y), r1(X), w2(Z), r1(Y), r3(Z), r1(Z), r2(Y), w2(Y), w3(Z), w1(X), w1(Z)

(a) Apply the basic timestamp ordering (BTO) algorithm to schedules S1 and S2. Determine whether or not the algorithm allows the execution of the schedules, and discuss cascading rollback (if any).

Hints: each operation takes one time unit, and timestamp of each transaction is the time associated to its first operation. For example, timestamps of transactions T1, T2, and T3 in schedule S1 are 3, 6, and 1 (respectively).

(b) Testing the serializability of S1 and S2 by serialization graph technique to prove that the successful execution of a schedule under BTO will ensure the serializability of the schedule.

(c) Examine the recoverable characteristic of S1 and S2. What schedule (S1 or S2) can be executed under the strict timestamp ordering (STO) algorithm and write an equivalent strict schedule for it?

4. Deductive Database

Consider a deductive database with the following rules:

REACHABLE(X, Y) :- CITY(X), CITY(Y), FLIGHT(X, Y)
REACHABLE(X, Y) :- CITY(X), CITY(Z), FLIGHT(X, Z), REACHABLE(Z, Y)

Where REACHABLE(X, Y) means that city Y can be reached from city X, and FLIGHT(X, Y) means that there is a flight from city X to city Y (Note: No flight in reverse direction can be automatically assumed).

1. Construct fact predicates that describe the following:

i. New Delhi (del), Beijing (pek), Saigon (sgn), Auckland (akl), Singapore (sin) and Brisbane (bne) are cities.

ii. The following 5 flights exist: sin to del, del to pek, pek to sgn, akl to sin and bne to akl (Note: No flight in reverse direction can be automatically assumed).

2. Construct a model theoretic interpretation (that is, an interpretation similar to the one shown in Figure 24.13, Lecture Notes) of the above rules using the given facts.

3. Is there a guarantee of reachability between any 2 cities? Give reason(s) or example(s) to support your answer.

(b)
There is 1 new flight added: sgn to bne.

1. Update the model theoretic interpretation to include the new flight.

2. Prove that REACHABLE(pek, akl) is true. Show your work at each step.

3. Is there a guarantee of reachability between any 2 cities? Give reason(s) or example(s) to support your answer.

(c)
The following predicates are added:

DURATION(del, pek, 6).
DURATION(sin, del, 5.5).
DURATION(sgn, bne, 8).
DURATION(pek, sgn, 5).
DURATION(bne, akl, 3).
DURATION(akl, sin, 10.5).

Note: DURATION(X, Y, Z) means that a flight from X to Y is in Z hours. 5.5 means 5 hours and 30 minutes. Given a rule named as REACHABLE_AND_DURATION(X, Y, Z):
REACHABLE_AND_DURATION(X, Y, Z) :- FLIGHT(X, Y), DURATION(X, Y, Z)
REACHABLE_AND_DURATION(X, Y, Z) :- FLIGHT(X, T), DURATION(X, T, K), REACHABLE_AND_DURATION(T, Y, H), K+H = Z

The rule means that city Y can be reached from city X and the total hours of flights is Z hours. Assume that we have a built-in comparison predicate "=" which allows us to check equality between 2 arguments. And a built-in arithmetic function "+" that allows us to sum 2 numeric arguments.

1. Prove that REACHABLE_AND_DURATION(bne, del, 19) is true. Show your work at each step.

2. Consider the following query: What cities are reachable in less than 20 hrs of flights from Delhi? Show how to express it in Datalog. Assume that we have a built-in comparison predicate "<" which allows us to check inequality between 2 arguments. Hint: write a new rule and write a query based on that rule.

Reference no: EM132446280

Questions Cloud

Identifying physical properties and meaning : Data acquisition: Gathering the raw material. Data transformation: Enhancing your data through modification and consolidation.
Whats the role and place of women in western cultures : What does Gilman see as the plight of women in her own society? What is the cost to women of being consigned to that plight?
Discuss pros and cons with doing business with us companies : Discuss pros and cons with doing business with US companies from your chosen country's point of view (conduct research). What would be your approach.
Tentative dissertation topic after completing a draft : Write a short paper assessing your tentative dissertation topic after completing a draft literature review in thiscourse.
CP5520 Advanced Databases and Applications Assignment : CP5520 Advanced Databases and Applications Assignment Help and Solution, James Cook University - Assessment Writing Service
What additional information provided under vulnerabilty tab : Using a Web browser, visit securityfocus's website. What is Bugtraq, and how would it be useful? What additional information is provided under.
Assignment on socratic dialogue : For this assignment you will create a Socratic dialogue. The dialogue will be completed in two parts. The first part will be 1-2 pages of notes to help
Write short essay on the lady or the tiger : Write Short Essay on The Lady or the Tiger, which comes through the door, the lady, or the tiger? analysis and specific examples from the story along
Perform a research audit on one of the top 10 companies : Perform a research audit on one of the top 10 companies identified by Diversity Inc as a company that demonstrates the business case for diversity.

Reviews

Write a Review

Database Management System Questions & Answers

  Analyze the database environment

Analyze the database environment. Describe the problems and constraints.

  Draw the pie chart or line chart of data anomalies

INSS 422 - Business Intelligence - identify data anomalies that must be removed before data can be loaded in data warehouse

  What is difference between authentication and authorization

What is the difference between authentication and authorization? What are six problems with using operational data for BI processing? What is an SQL injection attack? What is the difference between a database and a DBMS?

  Display table giving balance on loan at end of each month

Write a program to solve the following problem: A TV set is purchased with a loan of $563 to be paid off with 5 monthly payments of $116. The interest rate is 1 percent per month. Display a table giving the balance on the loan at the end of ea..

  Create a database to control its local libraries

A county wishes to create a database to control its local libraries. Each library has a number of employees, one of whom is designated as the manager of the library and is responsible for supervising employees and the general day-to-day management..

  Defines the semantic checks necessary to produce

The third project involves writing the semantic analyzer for the compiler that was begun in the previous projects. To simplify the semantic error checking, you are to remove the ability to have multiple functions from the grammar and the ability t..

  Create a comparison chart that lists the functions of data

Create a comparison chart or table that lists and compares the features and functions of data with in your organization. These functions should be related.

  What are the differences in the sql supported by rdbms

Start by researching Microsoft Access and other prominent RDBMS such as MS SQL Server, Oracle and My SQL. Compare and contrast these systems based on key features such as scalability, ease of implementation (development and support), performance, ..

  What is the current annual cost of system unavailability

What is the current annual cost of system unavailability? (You will need to refer to Tables 12-2 and 12-3 shown below to answer this question.)

  Create data file grades with records of the form

Input names of students from the user, terminated by ZZZ, and create a data file GRADES with records of the form.

  Case study queensland liquor national online trader

case study queensland liquor national online trader databasequeensland liquor national better known as qln owns an

  Design and develop a relational database

You are required to produce a structured database design for the LCR system that will represent a blue-print/documentation for the system and create and populate the relational database for the London Car Rental System as specified in Assignment - ..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd