GTU MCA MATERIAL FOR DBMS II

RSS
  • Home
  • Quick Review
  • Assignment
  • Backup and Recovery
  • Differences
  • About Me

Wednesday, March 9, 2011

Assignment - 3 Database Backup and Recovery

Q-1. Explain the following in question in detail?

1). What is Database Backup? Why backup is needed? Explain Types of Database Backup?
2). Discuss different types of database failures that may occur in database environment?
3). What is Recovery? Explain types of Recovery? (Forward,Backward Recovery)
4). What is Log Based Recovery? Explain all Log based Recovery technique with Example?
5). What is Checkpoint? How is checkpoint information is used in recovery operation following System crash explain with example?
6). Describe Shadow Paging Recovery Technique? Under what circumstances does it not require a transaction log? List advantages and disadvantage of shadow paging?
7). What is Database Buffer? Explain Buffer Management technique used in database recovery?
8). Table : Transaction T1

Time shot
Transaction Step
Actions
Time-1
Read (A,a1)
Read current employee’s load balance.
Time-2
a1:= a1 – 500
Debit the Account by INR 500
Time-3
Write(A,a1)
Write the new loan balance
Time-4
Read (B,b1)
Read the current account payable balance
Time-5
b1 := b1 + 500
Credit the account balance by INR 500
Time-6
Write(B,b1)
Write the new balance
Time-7
Commit T1
Commit entire transaction

Consider the transaction as above Table to create log entries for immediate updates. Suppose, that a failure occurs just after the transaction log record for action Write(B,b1) has been Written.
a). Show the Contents of transaction log at the time of failure.
b). What action is necessary and Why?
c). What are the Resulting value of A and B?
9). Consider the transaction as above Table to create log entries for deferred updates. Suppose, that a failure occurs just after the record is written to the transaction log?
a). Show the Contents of transaction log at the time of failure.
b). What action is necessary and Why?
c). What are the Resulting value of A and B?
10).  Consider the following Transaction Step for Immediate Update Technique. Initial Value of A=1000, B=2000 and C=700.
         
Transaction Step
Actions
Begin Transaction T1
Start Transaction T1
            Read (A)
Read Value A
            A:= A – 50
Deduct 50 from A
            Write(A)
Write the new value of A
            Read (B)
Read the Value of B
            B := B + 50
Add 50 to B
            Write(B)
Write the new value of B
End Transaction
Commit entire transaction T1
Begin Transaction T2
Start Transaction T2
           Read (C)
Read Value of C
           C:=C-100
Deduct 100 from C
           Write (C)
Write the new value for C
End Transaction T2
Commit Entrire transaction T2

  • Create Log entries for Above transaction steps.
  • Let us Assume that the crash occurs just after the log record for step write(B) of transaction T1 then
    • What action is necessary and why?
    • What are the resulting value of A and B
  • Let us Assume that Crash comes just after the log record for the Wrtite(C) of Transaction T2 then
    • What action is necessary and Why?
    • What are the resulting value of A and B?
  • Finally, Let us Assume that Crash occurs just after the log record for Transaction
    • What action is necessary and Why?
    • What are the resulting value of A and B?

11). Consider the following log entries.

Log Entries
T1,Start
T1,A,5000,4500
T1,Commit
Checkpoint
T2,Start
T2,B,1000,1050
T2,C,4000,3900
T2,Commit
T3,Start
T3,D,2500,2000
T4,Start
T4,E,1000,1200
T4,F,1200,1400

Suppose, that system crash is occurs after the last write entry of F of transaction T4 then What action is necessary and why?

Q-2. Differentiate the following :

1). Deferred Update Vs Immediate Update
2). Rollforward Vs Rollback
3). Stable Storage Vs Disk
4). Volatile Storage Vs Non-Volatile Storage
5). System Crash Vs Media Failure

Q-3. Answer the following in One line?

1) If the buffer pool is large enough that uncommited data are never forced to disk, is UNDO still necessary?
2) How about REDO?
3) If updates are always forced to disk when a transaction is performed, is UNDO still necessary?
4) How about REDO?
5) After a soft crash, where in the log should Analysis start?


Posted by Dr. Parag Shukla at 10:50:00 PM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: database buffers, differed Update, Immediate Update, media recovery, Shadow Paging, Undo/Redo Algorithm

Wednesday, February 23, 2011

Assignment-2 Concurrency Control


620006 (DBMS-II)    Assignment-2 Concurrency Control  
Submission Date : 08-03-2011
 
Q-1. Explain the Following Questions.

1). What is Concurrency Control? Why it is needed ? What is its importance?
2). Explain different problem of Concurrency control with and example?
3). What is Serializability? What is its objective?
4). What is locking? What are the Different types of Lock? Explain different level of locking?
5). How does Locking Protocol work?
6). What are the disadvantage of Basic locking protocal? What is Advantage of two phase locking?
7). How does 2PL work?
8). What is Deadlock? How are deadlock handled? What is deadlock prevention? What is deadlock detection and Recovery? Explain with an Example.
9). What is Timestamp Ordering protocol?
10). How does Timestamp Ordering protocol work? Explain with an example?
11). What is Thomas’s write rule and why is it important? (Ignore Obsolete Write Rule)
12). What are the different phases in a validation based concurrency technique?
13). How does validation based concurrency technique work? (Optmistic Technique)
14). What is cascading rollback? Explain with an Example?
15). Define the terms : Lock Point, Strict 2PL, Starvation

Q.2. Differentiate the following :

1). Dirty Read Vs Unrepeatable Read
2). Serial Schedule Vs Non-Serial Schedule
3). Lost Update Vs Uncommitted Data
4). Starvation Vs Deadlock

Q.3. State whether the following statements are true or false. Justify. No Justification, no marks.

1.    Level 1 transaction is the minimum consistency requirement that allows a transaction to be recovered in the event of system failure.
2.    There is no deadlock in the timestamp method of concurrency control.
3.    Level 0 transactions are recoverable.
4.    The objective of concurrency control is to schedule or arrange the transactions in such a way as to avoid any interference.
5.    In a shrinking phase, a transaction release all locks and can not obtain any new locks.

Posted by Dr. Parag Shukla at 2:14:00 AM 0 comments
Email This BlogThis! Share to X Share to Facebook

Sunday, February 13, 2011

Assignment-1 Transaction Processing

                                               Submission Date:23-Feb-2011
 
Q-1. Explain the following questions in detail.

1.       What is a transaction explain with example?
2.       Draw a state diagram and discuss the typical states that a transaction goes through execution?
3.       Explain all transaction property with suitable example?
4.       What is transaction log? What are the typical kind of records in a transaction log?
5.       Explain Transaction Control Statement of SQL with Syntax and Example?

Q-2. Fill in the Blanks.

1.   Collection of operations (for example, all the operations involved in the paymet of telephone bill) that form a single logical unit of work are called_______________.

2.   The ACID properties of a transactions are______, _______, _______and _________.

3.   _______ means that either all operations of the transactions are reflected properly in the database or none are.

4.   _______ means that execution of a transaction in isolation preserves the consistency of the database.

5.  The ____ of the DBMS ensures the atomicity of each transaction.

6.  Ensuring isolation property is responsibility of the _______ of the DBMS.

7.  The SQL statements used for transaction control are _______, _______ and _______.

8.  Transaction Log is a _______ of all _______ and the corresponding changes to the _________.

9.  A Consistent database state is one in which all _________ constraints are satisfied.

Q-3. State Whether the following statements are true or false. Justify your answer

1.  The effect of successfully completed transaction are permanently recorded in the database and must not lost because of subsequent failure.
2.   The transaction consists of all the operations executed between the beginning and end of the transaction.
3.  A transaction that is either committed or aborted is said to be terminated.
4.  Atomic transaction is transaction in which either all actions associated with the transaction are executed to completion, or none are performed.
5.  Log is a record of all transactions and corresponding changes to the database.
6.  The DBMS automatically update the transaction log while executing transactions that modify the database.
7.  A Transaction is said to be in committed state if it has partially committed, and it can be ensured that it will be never aborted.
8. A transaction is a program unit, which can either be embedded within an application program or can be specified interactively via a high-level query language such as SQL.
9. A transaction that changes the contents of the database must alter the database  from one consistent state to another.
Posted by Dr. Parag Shukla at 10:23:00 PM 0 comments
Email This BlogThis! Share to X Share to Facebook
Labels: Assignment-1, Transaction Processing, Transactions

Tuesday, February 8, 2011

DBMS-II Syllabus

Posted by Dr. Parag Shukla at 9:02:00 PM 0 comments
Email This BlogThis! Share to X Share to Facebook
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Total Pageviews

Blog Archive

  • ▼  2019 (1)
    • ▼  March (1)
      • Privacy Policy
  • ►  2016 (7)
    • ►  August (6)
    • ►  July (1)
  • ►  2011 (16)
    • ►  May (2)
    • ►  April (6)
    • ►  March (5)
    • ►  February (3)
  • ►  2010 (9)
    • ►  May (4)
    • ►  March (5)
  • ►  2009 (1)
    • ►  December (1)

Followers

Blog List

Search

Parag Shukla. Powered by Blogger.

Popular Posts

  • Serial Schedule Vs Non-Serial Schedule
    Serial Schedule Non-Serial Schedule A serial schedule is a sequence of operat...
  • Dirty Read Vs Unrepeatable Read
    Dirty Read Unrepeatable Read A dirty read problem occurs when one transaction updates a ...
  • Log Based Recovery
    Log Based Recovery The most widely used structure for recording database modification is the log. The log is a sequence of log ...
  • Lost Update Vs Uncommitted Data
    Lost Update Uncommitted Data This problem is also known as “Multiple Update...
  • Shadow Paging
    Shadow Paging This technique does not require LOG in single user environment In mult...
  • Starvation Vs Deadlock
    Starvation Deadlock Starvation happens if same transaction is always choosen ...
  • Checkpoints
    Checkpoints When System failure occurs o We must consult log to determine those transaction that need to be redone and those tra...
  • Defferred Update method
    Deferred update Do not physically update the database on disk until after a transaction reaches its commit point; Then updates are r...
  • Assignment - 7 Query Processing & Optimization
    Assignment – 7         Query Processing & optimization    Submission Date 30-05-11   Q-1. Explain th...
  • Immediate Update Method
    Immediate update technique Database may be updated by some operations of a transaction before the transaction reaches its commit poi...
Copyright © 2010 GTU MCA MATERIAL FOR DBMS II