Que4.22. Describe the important types of recovery ways. Explain their advantages and disadvantages. Answer There are numerous different database recovery ways to recover a database 1. Prolonged update recovery relateQ.4.18, runner 4 – 15A, Unit- 4. Advantages Recovery is easy. Slinging rollback doesn’t do because no other sale sees the work of another until it’s committed. Disadvantages Concurrency is limited. 2. Immediate update recovery relateQ.4.18, runner 4 – 15A, Unit- 4. Advantages a. It allows advanced concurrency because deals write continuously to the database rather than staying until the commit point. Disadvantages a. It leads to slinging rollbacks. It’s time consuming and may be problematic. Que4.23. What’s a impasse? Describe styles to handle a impasse. OR What’s impasse? How it can be detected and avoided? Answer impasse 1. A impasse is a situation in which two or further deals are staying for cinches held by the other sale to release the cinch. 2. Every sale is staying for another sale to finish its operations. styles to handle a impasse 1. impasse forestallment protocol This protocol ensures that the system will not go into impasse state. There are different styles that can be used for impasse forestallment Pre-declaration system This system requires that each sale locks all its data item before it starts prosecution. Partial ordering system In this system, system imposes a partial ordering of all data particulars and requires that a sale can lock a data item only in the order specified by partial order. Timestamp system In this system, the data item are locked using timestamp of sale. 2. impasse discovery a. When a sale waits indefinitely to gain a cinch, system should descry whether the sale is involved in a impasse or not. stay- for- graph is one of the styles for detecting the impasse situation. c. In this system a graph is drawn grounded on the sale and their cinch on the resource. , also there’s a If the graph created has a unrestricted circle or a cycle. impasse. T1 T2 stay- for- cinch( R1) stay- for- cinch( R2) 4.23.1. stay- for- graph. 3. Recovery from impasse Selection of a victim In this we determine which sale( or deals) to roll back to break the impasse. We should rollback those deals that will dodge the minimal cost. Rollback The simplest result is a ‘‘ total rollback ’’. repeal the sale and also renew it. Starvation In a system where selection of deals, for rollback, is grounded on the cost factor, it may be that the some deals are always picked up. 4. impasse avoidance impasse can be avoided by following styles periodical access If only one sale can pierce the database at a time, also we can avoid impasse. Autocommit sale It includes that each sale can only lock one resource incontinently as it uses it, also finishes its sale and releases its cinch ahead requesting any other resource. Ordered updates If deals always request coffers in the same order( for illustration, numerically thrusting by the indicator value of the row being locked) also system don’t enters in impasse state. d. By rolling back clashing deals. e. By allocating the cinches where demanded. Que4.24. bandy about the impasse forestallment schemes. AKTU 2016- 17, Marks 10 OR bandy about impasse forestallment schemes. Answer impasse forestallment schemes 1. stay- die scheme i. In this scheme, if a sale request to lock a resource( data item), which is formerly held with clashing cinch by some other sale, one of the two possibilities may do , i, If TS( Ti)< TS( Tj).e., Ti, which is requesting a clashing cinch, is aged than Tj, Ti is allowed to stay until the data item is available. , i, If TS( Ti)> TS( Tj).e., Ti is youngish than Tj, so Ti dies. Ti is renewed latterly with arbitrary detention but with same timestamp. ii. This scheme allows the aged sale to stay but kills the youngish one. 2. Crack- delay scheme i. In this scheme, if a sale request to lock a resource( data item), which is formerly held with clashing cinch by some other sale, one of the two possibilities may do , i, If TS( Ti)< TS( Tj).e., Ti, which is requesting a clashing cinch, is aged than Tj, Ti forces Tj to be rolled back, that’s Ti injuries Tj. Tj is renewed latterly with arbitrary detention but with same timestamp. , i, If TS( Ti)> TS( Tj).e., Ti is youngish than Tj, Ti is forced to stay until the resource( i.e., data item) is available. ii. This scheme, allows the youngish sale to stay but when an aged sale request an item held by youngish one, the aged sale forces the youngish one to repeal and release the item. In both cases, sale, which enters late in the system, is abandoned. Que4.25. What’s impasse? What are necessary conditions for it? How it can be detected and recovered? Answer impasse relateQ.4.23, runner 4 – 20A, Unit- 4. Necessary condition for impasse A impasse situation can arise if the following four conditions hold contemporaneously in a system 1. collective rejection At least one resource must be held in a nonsharable mode; that is, only one process at a time can use the resource. still, the requesting process must If another process requests that resource. be delayed until the resource has been released. 2. Hold and stay A process must be holding at least one resource and staying to acquire fresh coffers that are presently being held by other processes. 3. No usurpation coffers can not bepre-empted; i.e., a resource can be released only by the process holding it, after that process has completed its task. 4. indirect delay A set{ P0, P1,., Pn} of staying processes must live such that P0 is staying for a resource held by P1, P1 is staying for a resource held by P2,., Pn – 1 is staying for a resource held by Pn, and Pn is staying for a resource held by P0. Que4.26. What’s distributed databases? What are the advantages and disadvantages of distributed databases? OR Explain the advantages of distributed DBMS. 1. A distributed database system consists of collection of spots, connected together through a communication network. 2. Each point is a database system point in its own right and the spots have agreed to work together, so that a stoner at any point can pierce anywhere in the network as if the data were all stored at the stoner’s original point. 3. Each side has its own original database. 4. A distributed database is disintegrated into lower data sets. 5. DDBMS can handle both original and global deals. Advantages of DDBMS 1. DDBMS allows each point to store and maintain its own database, causing immediate and effective access to data. 2. It allows access to the data stored at remote spots. At the same time druggies can retain the control to its own point to pierce the original data. 3. still, communication If one point isn’t working due to any reason( for illustration. link goes down) the system won’t be down because other spots of the network can conceivably continue performing. 4. New spots can be added to the system anytime with no or little sweats. 5. If a stoner needs to pierce the data from multiple spots also the asked query can be subdivided intosub-queries in parallel. Disadvantages of DDBMS 1. Complex software is needed for a distributed database terrain. 2. The colorful spots must change communication and perform fresh computations to insure proper collaboration among the spots. 3. A by- product of the increased complexity and need for collaboration is the fresh exposure to indecorous updating and other problems of data integrity. 4. still, or if If the data aren’t distributed duly according to their operation. queries aren’t formulated rightly, response to requests for data can be extremely slow.