Skip to main content

Schedule in DBMS

Schedule

A series of operation from one transaction to another transaction is known as schedule. It is used to preserve the order of the operation in each of the individual transaction.

Schedule in DBMS


1. Serial Schedule
The serial schedule is a type of schedule where one transaction is executed completely before starting another transaction. In the serial schedule, when the first transaction completes its cycle, then the next transaction is executed.

For example: Suppose there are two transactions T1 and T2 which have some operations. If it has no interleaving of operations, then there are the following two possible outcomes:
  1. Execute all the operations of T1 which was followed by all the operations of T2. 
  2. Execute all the operations of T1 which was followed by all the operations of T2. 

  • In the given (a) figure, Schedule A shows the serial schedule where T1 followed by T2.
  • In the given (b) figure, Schedule B shows the serial schedule where T2 followed by T1.

2. Non-serial Schedule
  • If interleaving of operations is allowed, then there will be non-serial schedule.
  • It contains many possible orders in which the system can execute the individual operations of the transactions.
  • In the given figure (c) and (d), Schedule C and Schedule D are the non-serial schedules. It has interleaving of operations.

3. Serializable Schedule
  • The serializability of schedules is used to find non-serial schedules that allow the transaction to execute concurrently without interfering with one another. 
  • It identifies which schedules are correct when executions of the transaction have interleaving of their operations.
  • A non-serial schedule will be serializable if its result is equal to the result of its transactions executed serially.

Schedule in DBMS

Schedule in DBMS

Schedule in DBMS

Schedule in DBMS



Here,

Schedule A and Schedule B are serial schedule.

Schedule C and Schedule D are Non-serial schedule.

Comments

Popular posts from this blog

SQL Injection

SQL Injection The SQL Injection is a code penetration technique that might cause loss to our database. It is one of the most practiced web hacking techniques to place malicious code in SQL statements, via webpage input. SQL injection can be used to manipulate the application's web server by malicious users. SQL injection generally occurs when we ask a user to input their username/userID. Instead of a name or ID, the user gives us an SQL statement that we will unknowingly run on our database. For Example - we create a SELECT statement by adding a variable "demoUserID" to select a string. The variable will be fetched from user input (getRequestString). demoUserI = getrequestString("UserId"); demoSQL = "SELECT * FROM users WHERE UserId =" +demoUserId; Types of SQL injection attacks SQL injections can do more harm other than passing the login algorithms. Some of the SQL injection attacks include: Updating, deleting, and inserting the data: An attack can mo...

What is the monitor? How many types and what is it? Details about CRT, LCD and LED monitors.

मॉनिटर क्या है? कितने प्रकार का होता है और क्या होता है? सीआरटी, एलसीडी और एलईडी मॉनिटर के बारे में विवरण। मॉनिटर क्या है? = मॉनिटर वह पार्ट्स है जो कंप्यूटर सिस्टम के साथ टीवी जैसा दिखता है। मॉनिटर कंप्यूटर सिस्टम का एक बहुत ही महत्वपूर्ण आउटपुट डिवाइस है। इसे डिस्प्ले डिवाइस के नाम से भी जाना जाता है। कंप्यूटर पर हम जो भी कार्य करते हैं उन्हें इस मॉनिटर के माध्यम से देखा जा सकता है, इसलिए मॉनिटर को विजुअल डिस्प्ले यूनिट कहा जाता है। मॉनिटर अलग-अलग साइज में आते हैं जैसे- 14 इंच, 15 इंच, 17 इंच, 19 इंच आदि। (Image by - Google Images) मॉनिटर कितने प्रकार के होते हैं? = रंग प्रदर्शन के आधार पर मॉनिटर्स को दो श्रेणियों में विभाजित किया जा सकता है। 1) मोनोक्रोम मॉनिटर (Monochrome Monitor), 2) कलर मॉनिटर (Color Monitor) । *  वर्तमान में मोनोक्रोम मॉनिटर का उपयोग शायद ही ध्यान देने योग्य है। अब हर जगह कलर मॉनिटर का इस्तेमाल किया जाता है। 1) मोनोक्रोम मॉनिटर (Monochrome Monitor) = इस प्रकार का मॉनिटर केवल सादा-काला चित्र प्रदर्शित करता है। वर्तमान में मोनोक्रोम मॉनिटर बहुत कम उपयोग होता ...

circumference and arc Length of the circle

Define a class named Circle as described below: Data Members: radius, angle Methods : 1) constructor. 2) circleCircumference() to compute the circumference of the circle. 3) arcLength() to compute the length of an arc for a given angle. Within the main( ) method of the class named CircleDemo, create an object of the class Circle.  Compute the circle’s circumference when the radius is 20 and the arc length when the angle is 90. class Circle{ public double radius; public double angle; public Circle(double radius, double angle){ } public double circleCircumference(double radius){ return 2*Math.PI*radius; } public double arcLength(double radius, double angle){ return radius*angle; } } public class CircleDemo { public static void main(String[] args) { Circle c1 = new Circle(20,90); System.out.println("The Circumference of the Circle is "+c1.circleCircumference(20)); System.out.println("The arc Length of the circle is "+c1.arcLength(20,90)); } } OUTPUT: The Circumference ...