Better Concurrency Control in Distributed Database System

Advertisement
  • Rana Toqeer Ahmad Khan
  • Computer Science
  • Virtual University of Pakistan
  • Sargodha, Pakistan
  • ranatoqeer@gmail.com

Abstract – In this paper we will analyze Contrrency Control in Distributed Database System. Nowadays most applications rely on a distributed data system. Most transactions are done in a database at the same time so we must maintain ACID assets to avoid inconsistencies in the information delivered. To store ACID assets, the OCC (Optimistic Concurrency Control) method is also used.

Keywords – Cash management; Details submitted; Activity; Consistency; Proper Financial Management

Introduction

The requirements for today’s business are reliability, security and easily accessible information. When using a single database, there is a problem retrieving less data from the database. Due to several applications the central server becomes bottled. To improve the simultaneous retrieval and processing of queries at different sites, the submitted database can be used. Therefore, the demand for distributed data system and client / server requests is increasing now by the day. A distributed website is a single database made up of information that is physically transmitted to multiple connected computers and connected networks. One logical database is also known as a visual database. DDB data is physically available in a variety of locations. Users can access data from different locations. Special software such as an distributed database management system makes database access clear to users. The main purpose of DDBMS software is to provide the way a distributed database is visible to users as a single database. This single domain look can be achieved through many visual elements such as transparent distribution, network emergence and transparent duplication. Withdrawal control is a very important issue for DDB (Distributed Database). In a system of various user information management, the method of synchronizing simultaneous access to a database is called concurrency control. Various strategies are used to obtain cash management such as two-stage closure, injury, waiting, death scheme, expense scheme and good concurrency control.

SEE ALSO: Importance of Internet Security (IoT) security

SEE ALSO: WAYS TO OVERCOME APPLICATIONS TO DEVELOP A NEW APPLICATION

REGISTER AGAIN: READING TEXT

THREATS

There are many business scenarios that encourage the use of distributed databases.

Data communication costs

Database data is distributed locally on different sites so when an application requires data, more data is available locally so that the cost of data communications is reduced.

Database restoration

Duplicate data is repeated on different sites so if data is not available from one site it is also available on other sites and at the same time the data can be returned to the location where the data is not available.

C. Sharing information

Many local organizations and their units always need to communicate, share their information and resources. This requirement can be met with the help of a duplicate or a standard database.

D. Distribution and independence of the business unit

Because many organizations are located in different areas and their categories are spread geographically across national borders and each category has the power to build its own data. For this reason segregation requires local data control.

E. Performance improvement

In a distributed database the data is stored on separate sites and the queries work the same. For this reason and the use of several resources alike increase system performance.

F. Increase av ailability and reliability

Advertisement

In a medium-sized database, the database is not available when this program fails. On the other hand, a database is also available on a distributed database in the event of a failure on a single item.

G. Quick response

Data transfer data is available on most sites and the data is available to multiple users in the area. In the case of central data there are rare data opportunities available in the user area. Due to the availability of location data on the distributed website increases the speed of processing the queries. With complex questions to answer quickly it was divided into smaller questions and processed similarly.

CONSTRUCTION OF USED DATABASE

Distributed data systems are required for applications that require distributed distribution and high access in the event of an embarrassment. System cases require information separated by robotic systems, financial-related establishments and carrier booking systems. The strategy used for the dispersed systems is the same as for integrating systems into multiple components.

Data Separation

We must demonstrate a consistent unit of information dissemination and partial to the transmitted framework. The website can be subdivided into logical sections for calls to be placed in specific locations. Unit tables are the most straightforward.

Three Types of Data Sharing

Horizontal division
Direct segregation
Hybrid classification
1) Horizontal division

In horizontal divisions divide or divide relationships into strands called lines and then distribute these specific lines called fragments at a site that is different from the distributed data system. Horizontal partitions can be used for use depending on the situation.

Think of a related student (Student_id, Student_name, Student_grade, Student class)

Stu_id Stu_name Stu_grade Stu_class
1 Ali A 8
2 Zia A 9th
3 Zain B 10
4 Aslam B 9

 

Status: Student 1: Divided by Stu_grade = A

Student 1

Stu_id Stu_name Stu_grade Stu_class
1 Ali A 8
2 Zia A 9th

 

Status: Student 2: Divided by Stu_grade = B

Student 2

Stu_id Stu_name Stu_grade Stu_class
3 Zain B 10
4 Aslam B 9

 

2) Direct separation

In the vertical dividing table is divided by symbols. Each straight piece must contain a key attribute so that when you want to make a real table then use the main attribute to achieve the goal.

Stu_id Stu_name Stu_grade Stu_class
1 Ali A 8
2 Zia A 9th
3 Zain B 10
4 Aslam B 9

 

Student 1

Stu_id Stu_name Stu_grade
1 Ali A
2 UZia A.
3 Zain B
4 Aslam B

 

Student 2

Stu_id Stu_class
1 8
2 9
3 10
Date 4 9

 

3) Hybrid classification

In hybrid division we include horizontal and vertical separation. We can also take advantage of vertical and horizontal cracks in hybrid splits.

a) Data duplication

Details are made in two or more areas to achieve tolerance of errors. Many sites may contain a copy of each piece. [1]

IV. Fundamentals of transaction processing and payment management

Activity: A transaction is a task or series of tasks performed in a database. The main concern with the transaction is that the database is the same before and after the transaction is terminated.

A. Transaction factors

Database reliability and consistency can be achieved through ACID structures. In these structures A means Atomicity, C means harmony, I mean separation and D means strength.

Atomicity: In the sale of Atomicity is considered a functional unit. This activity (Activity) must be complete or non-existent.

B. Consistency

Consistency is the accuracy of the transaction. When moving from one website to another database, the transaction complies with all integrity issues and does not violate integrity issues when the transaction is correct.

Advertisement

C. Separation

In the case of partitions where one transaction alters or alters the database, the other transactions must not be able to modify or read the database.

D. Strength

System-related assets that ensure that when delivered and retain data permanently, even system conflicts.

E. Financial management

Several users in DDBMS similarly access the database. Payment control is the process of synchronizing access to a distributed database. The user feels like they are working on a single database.

F. Distributed work

Distributed activity is what is done with multiple processes on different machines. This transaction requires co-operation between the local resource manager and the land transaction management system. Processing manager and manager of two basic resources for information submitted. The features of ACID are difficult to maintain in a transaction because at any time any process can fail but these properties should also refer to the distributed transaction. We can maintain ACID by using two tracking features in distributed transaction systems.

G.   Recoverable process

By recoverable processes log the activities and in the case of failure processes can be restored to their earlier states.

H.   Commit protocol

In the commit protocol the several processes coordinate with each other for committing or aborting of transaction

V.    Distributed concurrency control algorithm

In this paper we read different algorithms for money management. We review some of these algorithms and find an algorithm that makes transactions hopefully. We use the TPC-C bench to analyze a different algorithm and find the best algorithm. So now for the first time we will clarify the concept of shared transactions.

In shared sales transactions are done through different processes in different areas. Distributed transactions require interaction between the local resource manager and.

A. 2 section lock

With 2 lock levels, the required locks are available and removed in two stages. So the 2nd phase lock has two stages.

Growing category
Decreasing phase
1) The growing category

In the growing phase, the necessary locks are available. When all the necessary locks are found, this point is called a lock.

2) Reduction phase

In the reduction phase the locks are released and no new locks are available.

The 2PL protocol enforces serializability but may reduce monetary compliance for the following reasons.

Unnecessary holding the lock
Lock is too early
Payment for other transactions
2PL protocol variance
Conservative (Static) 2PL
Solid 2PL
Difficult 2PL
B. Preservation 2PL

In 2PL saves all locks obtained before starting and releases all locks after commitment.

1) Conservative Eligibility 2PL
Prevents a downgrade (a downgrade means that where one transaction failed and another transaction based on failed transactions relied on failed) reversal
Prohibition free
C. Solid 2PL

In a solid 2PL all cookies are released after commitment. Special locks cannot be removed until committed.

1) The beauty of 2PL

Avoid getting involved

2) 2PL Industries

Obstacles are possible

D. Difficult 2PL

In a strong 2PL special lock and shared locks cannot be removed until committed.

One lock

Special lock means the lock that is received when the user wants to type.

Shared key

Shared key means that when a user has received a read key and another user wants to receive a read key and read a key called a shared key.

1) The beauty of Rigorous 2PL

Avoid getting involved.

2) Strong demand for 2PL

Advertisement

There may be obstacles

E. EXPECT DEATH

For injuries and waiting we use Ts (Timestamp). Assuming that Ti is requesting a data object currently owned by Tj.

If Ts (Ti) <Ts (Tj) [Ti older than Tj]

Ti is allowed to wait otherwise if Ti is younger than Tj and aborts Ti (Ti dies) and restarts it later with the same stamp.

F. WAIT FOR THE FOOL

For injuries and waiting we use Ts (Timestamp). Assuming that Ti is requesting a data object currently owned by Tj.

If Ts (Ti) <Ts (Tj) [Ti older than Tj] then aborts Tj (Ti lesions Tj) and restarts it with the same stamp,

If Ts (Ti)> Ts (Tj) Ti is allowed to wait.

G. TIME-BASED SYSTEM

Expired system based on expiration of lock time.

An employee who has requested a lock waits at least for a specified period of time. If the lock is not provided within this time, the operation is said to be out of date and is automatically rolled back.

H. TIME MANAGEMENT DETAILS

Where 2PL does not produce data beyond the system, our use of OCC does. With 2PL, duplication does not give a benefit as the documents relating to who owns the bolt take the same as the exchange of the information considered by it over the system, so it should be included. Any information read about the implementation of 2PL can be a real, distributed and reliable hope. Our use of OCC may also allow intermediate exchange readings or generally conflicting ratings, and, as long as it does not allow such exchanges to be included, it does not offend the issuance. It does not indicate any restrictions. [4]

In Optimistic concurrency control every node takes control of a particular piece of data rather than keeping a copy of all the data and only that node has permission to publish the data change. This contains the advantages 2PL has had: exchanges that require only the information generated on their related hub do not have to remain firmly with the system. The difference is that each harp further has the assumed duplicate repetition of anything left in the database. These duplicates may be contradictory – in the event that we see an exchange that adds each record to the database, it is possible that this change cannot be currently disputed in each database package on a particular hub. The trustworthy exchange manager is empowered by this thought-provoking information on the exchange. At the time the exchange manager provided this information to the exchange, the exchange manager needed to contact another hub in the negotiating phase to check the compatibility. All interchangeable hubs need to acknowledge that the information _nea, that no painful disruption occurred before the data was sent. This is the most expensive (measured in time) (O (t) = max (RTT transaction)), in which (RTT transaction) is the arrangement of all the rotating cycles to the exchange-related hub. During the actual exchange, the exchange administrator does not play non-contact with any harp, and simply demands from a related harp.

1) Commitment phase

The OCC has a large part of the difficulty in the supply phase. There are no sales messages between exchanges prior to the meeting stage. Successful delivery formula is straightforward:

Advertisement

Make the package all the interruptions and transcripts turned into messaging application
Submit this application to create messages in all of the included hubs, including the original hub, regardless of whether there are any errors or omissions.
At that time, for each harp installed (an) Obtain a lock on all attributes read or written in the Commitment Request

(b) Confirm the request in order to commit and send the ambassador to give the flag to each other the included harp in the post

(c) Wait for the appropriate opportunity to submit a proposal f

(c) Wait for a reasonable to confer motion from each other included hub.

(d) Apply the focus on the database

(e) Release all locks

Steps c and d are skipped on the off chance that any hub reports an approval disappointment. All things considered, the hub executing the first exchange will make another Transaction Manager and run the exchange once more. To encourage the handling of an exchange on an accepting hub, the hubs will instantiate a Commit Manager, which is in charge of taking care of the Request to commit on the hub that got it. This implies on account of a multi-hub exchange, there will be various Commit-Supervisors active on different nodes, processing the same transaction.

CONCLUSION

In this paper, we have compared some advantage of distributed database over centralized database. We also describe some algorithms of concurrency control in distributed database like 2 Phase Locking (2PL) Variation of 2PL, Wound and Die, Wound and Wait, Time out Base Scheme and Optimistic Concurrency Control. While concurrently accessing the database ACID properties are very important and it has to be maintained during accessing on the database.

Optimistic Concurrency Control is better than other method for concurrency control because Optimistic Concurrency Control is ACID Compliant.

Acknowledgment

I sincerely thank Dr. Nayyer Masood Dar who taught us Database Management System and now is teaching us the Distributed Database Management System. We use the concept that we learnt from Dr. Nayyer Masood Dar.

We wish to express our sincere gratitude to Mr. Saif-ur-Rehman, Head of Department for guiding me to do our academic research paper.

We also thank to our parents who prayed for us and give the moral support to accomplish the academic research paper.