SlideShare a Scribd company logo
1 of 3
Brief explain how a DBMS handles concurrent execution of transactions
Solution
CONCURENT EXECUTION :
Schedule is a collection of one or more transactions and are executed according to their
arrangement in the schedule.Schedule is catogorized into 2 divisions.They are : a)Serial and b)
Concurrent
**//First let me introduce you Serial and later explanation on Concurrent Execution//**
a) Serial : An execution of transactions occurs one after the other(one-by-one)
b) Concurrent Execution : It is nothing but an execution of transactions parallelly by sharing
the CPU time among them.The database has the chances of containing inconsistence value if the
concurrent execution is not considered properly.
Let me explain you with an example,
Consider two transactions T1 and T2 which follows the instructions as below:
T1 :
Read S;
S = S*100;
Write S;
Read F;
F=F/2;
Write F;
T2 :
Read S;
Temp = S * 12;
Read B;
B = B +800;
Write B;
If T2 is a new transaction and suppose B should be deposited with the Rs.800 which is to be
deduced from S in Transaction T1.
If we want a serial schedule for Transactions T1 and T2 then either T1 executes before the T2
gets executed or else T1 will execute before T2 is being executed..So now by using Context
switching in concurrent Execution Transaction T1 gets executed partially and later T2 also
partially.
The following example can support these lines
T1 T2
Read S;
S = S *100;
Write A;
Read S;
Temp = S *12;
Read B;
B = B + Temp;
Write B;
Read F;
F = F /2;
Write F;
As we used Context Switching in this type of Schedule, the 1st one after performing the 3rd line
of Transaction T1, and after performing the last statement of T2. T1 first multiplies the amount
with 12 with S and writes the new value into S.Later T2 reads the value of S, calculates the value
of Temp to be Rs.250(say) and adds the value to B. The leftout part of T1 is executed and Rs.250
is added to B
So it is clear that the correct Context Switching is very important to maintain ACID properties
like Atomicity,Consistency,Isolation and Durability.

More Related Content

Similar to Brief explain how a DBMS handles concurrent execution of transactionsS.docx

Introduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and RecoveryIntroduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and RecoveryAjit Nayak
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYRohit Kumar
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMSkoolkampus
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & StateSurya Swaroop
 
database1.pptx
database1.pptxdatabase1.pptx
database1.pptxOmarKamil1
 
Transaction management in DBMS
Transaction management in DBMSTransaction management in DBMS
Transaction management in DBMSMegha Sharma
 
Characteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityCharacteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityMeghaj Mallick
 
Electrical Engineering Exam Help
Electrical Engineering Exam HelpElectrical Engineering Exam Help
Electrical Engineering Exam HelpLive Exam Helper
 

Similar to Brief explain how a DBMS handles concurrent execution of transactionsS.docx (20)

Introduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and RecoveryIntroduction to database-Transaction Concurrency and Recovery
Introduction to database-Transaction Concurrency and Recovery
 
Database Systems Assignment Help
Database Systems Assignment HelpDatabase Systems Assignment Help
Database Systems Assignment Help
 
dbms sanat ppt.pdf
dbms sanat ppt.pdfdbms sanat ppt.pdf
dbms sanat ppt.pdf
 
Ch15
Ch15Ch15
Ch15
 
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERYTRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
TRANSACTION MANAGEMENT AND TIME STAMP PROTOCOLS AND BACKUP RECOVERY
 
15. Transactions in DBMS
15. Transactions in DBMS15. Transactions in DBMS
15. Transactions in DBMS
 
Ch15 3717
Ch15 3717Ch15 3717
Ch15 3717
 
Ch15 3717
Ch15 3717Ch15 3717
Ch15 3717
 
transaction management, concept & State
transaction management, concept & Statetransaction management, concept & State
transaction management, concept & State
 
Question answer
Question answerQuestion answer
Question answer
 
Unit06 dbms
Unit06 dbmsUnit06 dbms
Unit06 dbms
 
database1.pptx
database1.pptxdatabase1.pptx
database1.pptx
 
Unit07 dbms
Unit07 dbmsUnit07 dbms
Unit07 dbms
 
Transaction management in DBMS
Transaction management in DBMSTransaction management in DBMS
Transaction management in DBMS
 
Characteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-abilityCharacteristics Schedule based on Recover-ability & Serial-ability
Characteristics Schedule based on Recover-ability & Serial-ability
 
Serializability
SerializabilitySerializability
Serializability
 
serializability in dbms
serializability in dbmsserializability in dbms
serializability in dbms
 
24904 lecture11
24904 lecture1124904 lecture11
24904 lecture11
 
Unit-IV_transaction.pptx
Unit-IV_transaction.pptxUnit-IV_transaction.pptx
Unit-IV_transaction.pptx
 
Electrical Engineering Exam Help
Electrical Engineering Exam HelpElectrical Engineering Exam Help
Electrical Engineering Exam Help
 

More from gilliandunce53776

Bullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docx
Bullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docxBullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docx
Bullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docxgilliandunce53776
 
c# Write an application that displays the following patterns separatel.docx
c# Write an application that displays the following patterns separatel.docxc# Write an application that displays the following patterns separatel.docx
c# Write an application that displays the following patterns separatel.docxgilliandunce53776
 
Business Law 1- Firm X and Firm Y are in dispute over a contract- They.docx
Business Law 1- Firm X and Firm Y are in dispute over a contract- They.docxBusiness Law 1- Firm X and Firm Y are in dispute over a contract- They.docx
Business Law 1- Firm X and Firm Y are in dispute over a contract- They.docxgilliandunce53776
 
Briefly explain the three types of IPv6 addresses-SolutionThree types.docx
Briefly explain the three types of IPv6 addresses-SolutionThree types.docxBriefly explain the three types of IPv6 addresses-SolutionThree types.docx
Briefly explain the three types of IPv6 addresses-SolutionThree types.docxgilliandunce53776
 
Brief timeline of the development of the theory and or technology and.docx
Brief timeline of the development of the theory and or technology and.docxBrief timeline of the development of the theory and or technology and.docx
Brief timeline of the development of the theory and or technology and.docxgilliandunce53776
 
Both Ford and Phillips Electric have faced major changes globally in t.docx
Both Ford and Phillips Electric have faced major changes globally in t.docxBoth Ford and Phillips Electric have faced major changes globally in t.docx
Both Ford and Phillips Electric have faced major changes globally in t.docxgilliandunce53776
 
Brand Foods Wholesale Corporation operates more than 590 membership wa.docx
Brand Foods Wholesale Corporation operates more than 590 membership wa.docxBrand Foods Wholesale Corporation operates more than 590 membership wa.docx
Brand Foods Wholesale Corporation operates more than 590 membership wa.docxgilliandunce53776
 
Betty retires from the BS Partnership when the basis of her one-third.docx
Betty retires from the BS Partnership when the basis of her one-third.docxBetty retires from the BS Partnership when the basis of her one-third.docx
Betty retires from the BS Partnership when the basis of her one-third.docxgilliandunce53776
 
Beyond aesthetics- what functional differences are there for running G.docx
Beyond aesthetics- what functional differences are there for running G.docxBeyond aesthetics- what functional differences are there for running G.docx
Beyond aesthetics- what functional differences are there for running G.docxgilliandunce53776
 
Below is accounting information for Cascade Company for 2013- What we.docx
Below is accounting information for Cascade Company for 2013-  What we.docxBelow is accounting information for Cascade Company for 2013-  What we.docx
Below is accounting information for Cascade Company for 2013- What we.docxgilliandunce53776
 
Below is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docxBelow is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docxgilliandunce53776
 
caiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docx
caiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docxcaiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docx
caiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docxgilliandunce53776
 
C++ inheritance True or false- If A is the superclass and B is the sub.docx
C++ inheritance True or false- If A is the superclass and B is the sub.docxC++ inheritance True or false- If A is the superclass and B is the sub.docx
C++ inheritance True or false- If A is the superclass and B is the sub.docxgilliandunce53776
 
C++ help! Write a function merge that merges two lists into one- alter.docx
C++ help! Write a function merge that merges two lists into one- alter.docxC++ help! Write a function merge that merges two lists into one- alter.docx
C++ help! Write a function merge that merges two lists into one- alter.docxgilliandunce53776
 

More from gilliandunce53776 (14)

Bullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docx
Bullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docxBullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docx
Bullen Inc- acquired 100- of the voting common stock of Vicker Inc- on.docx
 
c# Write an application that displays the following patterns separatel.docx
c# Write an application that displays the following patterns separatel.docxc# Write an application that displays the following patterns separatel.docx
c# Write an application that displays the following patterns separatel.docx
 
Business Law 1- Firm X and Firm Y are in dispute over a contract- They.docx
Business Law 1- Firm X and Firm Y are in dispute over a contract- They.docxBusiness Law 1- Firm X and Firm Y are in dispute over a contract- They.docx
Business Law 1- Firm X and Firm Y are in dispute over a contract- They.docx
 
Briefly explain the three types of IPv6 addresses-SolutionThree types.docx
Briefly explain the three types of IPv6 addresses-SolutionThree types.docxBriefly explain the three types of IPv6 addresses-SolutionThree types.docx
Briefly explain the three types of IPv6 addresses-SolutionThree types.docx
 
Brief timeline of the development of the theory and or technology and.docx
Brief timeline of the development of the theory and or technology and.docxBrief timeline of the development of the theory and or technology and.docx
Brief timeline of the development of the theory and or technology and.docx
 
Both Ford and Phillips Electric have faced major changes globally in t.docx
Both Ford and Phillips Electric have faced major changes globally in t.docxBoth Ford and Phillips Electric have faced major changes globally in t.docx
Both Ford and Phillips Electric have faced major changes globally in t.docx
 
Brand Foods Wholesale Corporation operates more than 590 membership wa.docx
Brand Foods Wholesale Corporation operates more than 590 membership wa.docxBrand Foods Wholesale Corporation operates more than 590 membership wa.docx
Brand Foods Wholesale Corporation operates more than 590 membership wa.docx
 
Betty retires from the BS Partnership when the basis of her one-third.docx
Betty retires from the BS Partnership when the basis of her one-third.docxBetty retires from the BS Partnership when the basis of her one-third.docx
Betty retires from the BS Partnership when the basis of her one-third.docx
 
Beyond aesthetics- what functional differences are there for running G.docx
Beyond aesthetics- what functional differences are there for running G.docxBeyond aesthetics- what functional differences are there for running G.docx
Beyond aesthetics- what functional differences are there for running G.docx
 
Below is accounting information for Cascade Company for 2013- What we.docx
Below is accounting information for Cascade Company for 2013-  What we.docxBelow is accounting information for Cascade Company for 2013-  What we.docx
Below is accounting information for Cascade Company for 2013- What we.docx
 
Below is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docxBelow is a depiction of a doubly-linked list implementation of the bag.docx
Below is a depiction of a doubly-linked list implementation of the bag.docx
 
caiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docx
caiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docxcaiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docx
caiorie Potenhally useful information- 4-1843I K -C + 273-15 760 mmHg-.docx
 
C++ inheritance True or false- If A is the superclass and B is the sub.docx
C++ inheritance True or false- If A is the superclass and B is the sub.docxC++ inheritance True or false- If A is the superclass and B is the sub.docx
C++ inheritance True or false- If A is the superclass and B is the sub.docx
 
C++ help! Write a function merge that merges two lists into one- alter.docx
C++ help! Write a function merge that merges two lists into one- alter.docxC++ help! Write a function merge that merges two lists into one- alter.docx
C++ help! Write a function merge that merges two lists into one- alter.docx
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxUnboundStockton
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonJericReyAuditor
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Blooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docxBlooming Together_ Growing a Community Garden Worksheet.docx
Blooming Together_ Growing a Community Garden Worksheet.docx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Science lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lessonScience lesson Moon for 4th quarter lesson
Science lesson Moon for 4th quarter lesson
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 

Brief explain how a DBMS handles concurrent execution of transactionsS.docx

  • 1. Brief explain how a DBMS handles concurrent execution of transactions Solution CONCURENT EXECUTION : Schedule is a collection of one or more transactions and are executed according to their arrangement in the schedule.Schedule is catogorized into 2 divisions.They are : a)Serial and b) Concurrent **//First let me introduce you Serial and later explanation on Concurrent Execution//** a) Serial : An execution of transactions occurs one after the other(one-by-one) b) Concurrent Execution : It is nothing but an execution of transactions parallelly by sharing the CPU time among them.The database has the chances of containing inconsistence value if the concurrent execution is not considered properly. Let me explain you with an example, Consider two transactions T1 and T2 which follows the instructions as below: T1 : Read S; S = S*100; Write S; Read F; F=F/2; Write F;
  • 2. T2 : Read S; Temp = S * 12; Read B; B = B +800; Write B; If T2 is a new transaction and suppose B should be deposited with the Rs.800 which is to be deduced from S in Transaction T1. If we want a serial schedule for Transactions T1 and T2 then either T1 executes before the T2 gets executed or else T1 will execute before T2 is being executed..So now by using Context switching in concurrent Execution Transaction T1 gets executed partially and later T2 also partially. The following example can support these lines T1 T2 Read S; S = S *100; Write A; Read S; Temp = S *12; Read B; B = B + Temp; Write B; Read F; F = F /2; Write F;
  • 3. As we used Context Switching in this type of Schedule, the 1st one after performing the 3rd line of Transaction T1, and after performing the last statement of T2. T1 first multiplies the amount with 12 with S and writes the new value into S.Later T2 reads the value of S, calculates the value of Temp to be Rs.250(say) and adds the value to B. The leftout part of T1 is executed and Rs.250 is added to B So it is clear that the correct Context Switching is very important to maintain ACID properties like Atomicity,Consistency,Isolation and Durability.