Que4.1. Write a short note on sale. Answer 1. A sale is a logical unit of database processing that includes one or further database access operations; these include insertion, omission, revision or reclamation operations. 2. The database operations that form a sale can be bedded within an operation program. 3. By specifying unequivocal begin sale and end sale we can specify the sale boundaries. 4. If the database operations in a sale don’t modernize the database but only recoup data, the sale is called a read-only sale. Que4.2. Explain ACID parcels of sale. OR What do you mean by sale? Explain sale property with detail and suitable illustration. OR What do you understand by ACID parcels of sale? Explain in details. OR Define sale and explain its parcels with suitable illustration. Answer sale relateQ.4.1, runner 4 – 2A, Unit- 4. To insure integrity of data, the database system maintains some parcels of sale. These parcels are known as ACID parcels. Let us consider an illustration for the set of operations 1. Abate the quantumRs. 500 from A’s account. 2. Add quantumRs. 500 to B’s account. ACID parcels are as follows 1. Atomicity It implies that either all of the operations of the sale should execute or none of them should do. illustration All operations in this set must be done. If the system fails to add the quantum in B’s account after abating from A’s account, return the operation on A’s account. 2. thickness The state of database before the prosecution of sale and after the prosecution of sale should be same. Example Let us consider the original value of accounts A and B are 1000 andRs. 1500. Now, regard A transferRs. 500 to accountB. Before sale A B = 1000 1500 = 2500 After sale A B = 500 2000 = 2500 Since, total quantum before sale and after sale are same. So, this sale preserves thickness. 3. insulation A sale mustn’t affect other deals that are running parallel to it. Example Let us consider another account C. If there’s any ongoing sale between C and A, it shouldn’t make any effect on the sale between A and B. Both the deals should be insulated. 4. continuity Once a sale is completed successfully. The changes made by sale persist in database. illustration A system gets crashed after completion of all the operations. If the system restarts it should save the stable state. An quantum in A and B account should be the same before and after the system gets a renew. Que4.3. Write and describe parcels of sale. How does the recovery director insure atomicity of deals? How does it insure continuity? Answer icing the atomicity 1. To insure atomicity, database system keeps track of the old values of any data on which a sale performs a write. 2. still, the database system If the sale doesn’t complete its prosecution. restores the old values. 3. Atomicity is handled by sale operation element. icing the continuity 1. icing continuity is the responsibility of a element called the recovery operation element. 2. The continuity property guarantees that, once a sale completes successfully, all the updates that it carried out on the database persist, indeed if there’s a system failure after the sale completes prosecution. Que4.4. Explain the utility of each property. Answer Atomicity Atomicity is useful to insure that if for any reason an error occurs and the sale is unfit to complete all of its way, also the system is returned to the state it was in before the sale was started. thickness The thickness property is useful to insure that a complete prosecution of sale from beginning to end is done without hindrance of other deals. insulation insulation property is useful to insure that a sale should appear insulated from other deals, indeed though numerous deals are executing coincidently. continuity continuity is useful to insure that the changes applied to the database by a married sale must persist in the database. Que4.6. How can you apply atomicity in deals? Answer perpetration of atomicity in sale can be done in two ways 1. Absoluteness a. All of the operations reprised within a database sale represent an infinitesimal unit of work. b. According to atomicity either all of sale will run to completion or none of them. c. There won’t be any partial sale in left over state from deficient prosecution of one or further operations in a sale. , all of the If the stoner decides to cancel everything. changes made by the sale will be undone and the state would be as if the sale noway began by using undo operation. e. For every change made by operations in the database, it logs undo data to be used to rollback the goods of operations. 2. collective rejection/ locking Only one sale will be allowed to progress by taking an exclusive cinch on the particular data item. b. The cinch won’t be released until the sale ends. Any other concurrent sale interested in streamlining the same row will have to stay. Que4.7. What’s serializability? Why serializability is needed? Write short note on serializability of schedule. Answer Serializability Serializability is a property of a sale schedule which is used to keep the data in the data item in harmonious state. It’s the classical concurrency scheme. Serializability is needed 1. To control concurrent prosecution of sale. 2. To insure that the database state remains harmonious. Serializability of schedule 1. In DBMS, the introductory supposition is that each sale preserves database thickness. 2. therefore, the periodical prosecution of a set of sale preserves database thickness. 3. A concurrent schedule is serializable if it’s original to a periodical schedule. Que4.9. Explain view serializability with illustration. Answer 1. The schedule S and S are said to be view original if following three conditions met a. For each data item Q, if sale Ti reads the original value of Q in schedule S, also sale Ti in schedule S, must also read the original value ofQ. b. For each data item Q if sale Ti executes read in schedule S and if that value produced by a write operation executed by sale Tj, also the read operation of sale Ti, in schedule S, must also read the value of Q that was produced by the same write operation of sale Tj. c. For each data item Q, the sale that performs the final write operation in schedule S must perform the final write operation in schedule S. 2. Conditions and insure that each sale reads the same values in both schedules and thus, performs the same calculation. Condition, coupled with condition and condition insure that both schedules affect in the same final system state. 3. The conception of view parity leads to the conception of view serializability. 4. We say that schedule S is view serializable, if it’s view original to periodical schedule. 5. Every conflict serializable schedule is also view serializable but there are view serializable schedules that aren’t discord serializable. Schedule S1 and S2 are view original as 1. T1 reads original value of data item A in S1 and S2. 2. T2 reads value of data item A written by T1 in S1 and S2. 3. T2 writes final value of data item A in S1 and S2. Que4.10. What’s schedule? Define the conception of recoverable, cascadeless and strict schedules. Answer Schedule A schedule is a set of sale with the order of prosecution of instruction in the sale. Recoverable schedule A recoverable schedule is one in which for each brace of sale Ti and Tj still, the commit operation of Ti if Tj reads a data item preliminarily written by Ti. appears before the commit operation of Tj. For illustration In schedule S, let T2 commits incontinently after executing read i.e., T2 commits before T1 does. Now let T1 fails before it commits, we must repeal T2 to insure sale atomicity. But as T2 has formerly married, it can not be abandoned. In this situation, it’s insolvable to recover rightly from the failure of T1. Schedule S T1 T2 read write read read Cascadeless schedule 1. A cascadeless schedule is one, where for each brace of sale Ti and Tj similar that Tj reads a data item preliminarily written by Ti, the commit operation to Tj appears before the read operation of Ti. 2. Indeed if a schedule is recoverable, to recover rightly from the failure of a sale Ti, we may have to rollback several deals. similar situations do if deals have read data written by Ti. Strict schedule 1. A schedule is called strict if every value written by a sale T is not read or changed by other sale until T either aborts or commits. 2. A strict schedule avoids slinging and recoverability.