Saturday, August 9, 2014

Database Recovery in Distributed Database

Question 4

Figure 1 - Execution of Transaction T in a distributed environment

Figure 1 shows a distributed database configured on sites A, B, C, and D. All the sites are connected. Assume that a request in the form of Transaction T is reaching Site A. For this case represented in Figure 1, answer the following questions;
(a) How do you handle and restore(recover) the database if Site A is failed during transaction T? Explain.
(b) How do you handle and restore(recover) the database if Site B is failed during transaction T? Explain.
(c) Assume that the Site C is failed. When it recovers from failure, it reads <ready T> control message for transaction T in its log file. How would site C restore the database using the <ready T> control message?
(d) Assume that the Site C is failed. When C recovers, it checks the log file for deciding the fate of the transactions that were running during failure. This step is very much necessary as it can lead the database to a consistent state. When you check the log file, what are the different cases or log entries which would force you to perform an Undo(T) (undo a transaction) on your own without consulting the other sites?

Answer

Click on the links to further view the answers;
 
(a) Transaction T is initiated at Site A. Hence, Site A is the Transaction Coordinator site according to the information provided and the given figure. Now, the other sites which are participating in Transaction T can execute the routine of 2PC protocol for handling the Coordinator Failure. For explanation, continue with the link.

(b) According the information provided, Site B is one of the participating site in Transaction T. Hence, the algorithm for handling Site Failure can be invoked and the database could be set right. For explanation, continue with the link.

(c) The appropriate solution for this case is to invoke the Handling of Site Failure routine. As Site C reads a <ready T> message, Site C, in any case cannot decide the fate of Transaction T. Hence, it has to approach other sites including the Coordinator site to know the decision on Transaction T. 

(d) There are two cases;
  • If the Site C has a record with <abort T>, it has to perform an Undo(T)
  • If the Site C does not contain any control messages (no abort, commit, or ready), it has to perform an Undo(T)





 

Distributed Databases Questions and Answers


Questions and Answers in Distributed Database Management System / Distributed Database Question and Answers / Practice Exam Questions with Answers in Distributed Database / Advanced Database Systems Questions and Answers

Questions and Answers in Distributed Database Management System



Data Fragmentation and Replication

Distributed Transactions

Commit Protocols to handle Distributed Transactions

Concurrency Control in Distributed Database

Deadlock Handling in Distributed Database

Availability and Robustness

Distributed Query Processing

Others





Two Phase Commit protocol control messages

The list of control messages used by 2PC to control a distributed transaction / What are the control messages used by 2PC to handle transaction and recovery?


The following are the control messages used by 2 Phase Commit (2PC) protocol for handling concurrent transactions;

<Prepare T> - Sent by the Transaction Coordinator of Transaction T to all the Participating Sites where Transaction T is executed.

<Ready T> - Sent by the Transaction Managers of all the participating sites whichever is ready to commit the Transaction T.

<No T> - Used by any Transaction Manager of the participating sites which is not ready for committing the Transaction T. This message is stored in the local log file of the participating site which is not ready for commit.

<Abort T> - Sent by a Transaction Manager of participating site which is not ready for commit. Also, sent by Transaction Coordinator to all participating sites to abort the Transaction T.

<Commit T> - Sent by Transaction Coordinator of Transaction T, if TC received <ready T> messages from all the participating sites.

Commit Protocol in Distributed Database - Questions with Answers


Questions and Answers in Distributed Database Management System - Commit Protocols / Distributed Database Question and Answers on the topic Commit Protocols / Practice Exam Questions with Answers in Distributed Database / Advanced Database Systems Questions and Answers

Commit Protocols - Questions and Answers in Distributed Database Management System

Click on the questions for answers:


4
Figure 1 - Execution of Transaction T in a distributed environment
Figure 1 shows a distributed database configured on sites A, B, C, and D. All the sites are connected. Assume that a request in the form of Transaction T is reaching Site A. For this case represented in Figure 1, answer the following questions;
5.
Figure 2 - Execution of Transaction T in a distributed environment

Figure 2 shows a distributed database consists of sites A, B, C, and D. The connections between different sites are shown in dashed lines. Answer the following questions;
(a) Assume that Site A initiates transaction T, and both Site A and Site C contains data for executing transaction T. Also assume that the link between Site A and Site D is failed. What is the effect of the link failure in handling the transaction T?
(b) Assume that the transaction T which is initiated at Site A need to be executed at all the sites (Site A, B, C, and D). If the communication link between Site A and Site B is failed, how does Site B can handle the situation?

6. In 2PC protocol, the coordinator failure is considered as the major disadvantage of 2PC protocol. Why?

8. How is Persistent Messaging (an alternate way to perform transaction processing) implemented?


*************


Go to Distributed Database home





Sunday, August 3, 2014

Distributed Operating System

Distributed Operating System / What is Distributed Operating System? / Types of Distributed Operating System / Distributed Shared Memory / Distributed OS lecture notes, questions, exams, and other materials / Example of Distributed OSs


Distributed OS


With the advent of computer networks, in which many computers are linked together and are able to communicate with one another, distributed computing became feasible. A distributed computation is one that is carried out on more than one machine in a cooperative manner. A group of linked computers working cooperatively on tasks, referred to as a distributed system, often requires a distributed operating system to manage the distributed resources. Distributed operating systems must handle all the usual problems of operating systems, such as deadlock. Distributed deadlock is very difficult to prevent; it is not feasible to number all the resources in a distributed system. Hence, deadlock must be detected by some scheme that incorporates substantial communication among network sites and careful synchronization, lest network delays cause deadlocks to be falsely detected and processes aborted unnecessarily. Interprocess communication must be extended to processes residing on different network hosts, since the loosely coupled architecture of computer networks requires that all communication be done by message passing. Important systems concerns unique to the distributed case are workload sharing, which attempts to take advantage of access to multiple computers to complete jobs faster; task migration, which supports workload sharing by efficiently moving jobs among machines; and automatic task replication at different sites for greater reliability. 


List of Distributed Operating Systems



l. IRIX operating system; was the operating system developed by Silicon Graphics, Inc. (SGI) to run natively on their MIPS workstations and servers
2.  AIX (Advanced Interactive eXecutive) is a series of proprietary Unix operating systems developed and sold by IBM for several of its computer platforms.
3.  Solaris operating system; Solaris is a Unix operating system originally developed by Sun Microsystems. It superseded their earlier SunOS in 1993. Oracle Solaris, as it is now known, has been owned by Oracle Corporation since Oracle's acquisition of Sun in January 2010for SUN multiprocessor workstations.
4.  Mac OS is a multi-threading and multitasking UNIX compatible operating system;




 

Friday, August 1, 2014

CS1301 Database Management Systems Fifth Semester Question May/June 2014

CS1301 Database Management Systems fifth semester question paper - May/June 2014 / Anna University Previous Year 2014 Exam Questions / Anna University Previous Year 2014 Computer Science and Information Technology Question Papers / CS 1301/CS 1254/070230034 — Database Management Systems Question with Answers

Click on the links for answers;



CS1301 Database Management Systems Fifth Semester Question May/June 2014



Question Paper Code : 53314
B.E./B.Tech. DEGREE EXAMINATION, MAY/JUNE 2014.
Fifth Semester
Computer Science and Engineering

CS 1301/CS 1254/070230034 — DATABASE MANAGEMENT SYSTEMS

(Common to Information Technology)
(Regulation 2004/2007)

(Common to B.E. (Part-Time) Fourth Semester, Regulation 2005)

Time : Three hours                                                             Maximum : 100 marks

Answer ALL questions.
PART A — (10 × 2 = 20 marks)

1. With a relevant example state ternary relationship.
2. Define the term primary key. Give an example.
3. State the differences between security and integrity.
4. What is decomposition and how does it address redundancy?
5. What is heap file?
6. When is it preferable to use a dense index rather than a sparse index?
7. List out the ACID properties.
8. What is shadow paging?
9. What is the need for complex data types?
10. What is data mining?


PART B — (5 × 16 = 80 marks)

11. (a) Discuss in detail about basic relational-algebra operations with suitable examples. (16)
Or
(b) Design an E-R diagram for a hospital management system. Assume your own constraints and data requirements. (16)

12. (a) (i) Consider the Employee database, where the primary key are underlined;
          Employee(empname, street, city)
          Works(empname, companyname, salary)
          Company(companyname, city)
          Manages(empname, managername)
And give an expression in SQL for the following queries;
          (1) Find the names of all employees who work for First Bank Corporation.
          (2) Find the names, street addresses, and cities of residence of all employees who work for First Bank Corporation and earn more than 200000 per annum.
          (3) Find all employees in the database who live in the same cities as the companies for which they work.
          (4) Find the names of all the employees who earn more than every employee of Small Bank Corporation. (4 X 2 = 8)
(ii) Discuss the strengths andweaknesses of the trigger mechanism. Compare triggers with other integrity constraints supported by SQL. (8)
Or

13. (a) (i) Describe the different types of file organization. Explain using a sketch of each of them with their advantages and disadvantages. (10)
(ii) Describe static hashing and dynamic hashing. (6)
Or
(b) (i) Explain the index schemas used in database systems. (10)
(ii) How does a DBMS represent a relational query evaluation plan? Explain. (6)

14. (a) (i) With a relevant example discuss two phase locking. (6)
(iii) Give an example of a scenario where two phase locking leads to deadlock. (4)
Or
(b) Why is recovery needed? Discuss any two recovery techniques. (16)

15. (a) (i) Discuss in detail about the object relational databases and its advantages. (8)
Or
(b) (i) Give the basic structure of XML and its document schema. (8)
(ii) What are the two important classes of data mining problems? Explain about rule discovery using those classes. (8)

***********




Anna University CS1301 DBMS Question papers Regulation 2004

Anna University CS1301 - Database Management Systems Previous Year Question Papers / Anna University B.E/B.Tech. Computer Science and Engineering And Information Technology DBMS Question Papers / Anna University B.E/B.Tech. Fourth Semster Computer Science and Engineering And Information Technology Programs Previous Years Question Papers as per Regulation 2004

Regulation 2004

















Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents