انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية العلوم للبنات
القسم قسم الحاسبات
المرحلة 2
أستاذ المادة مهدي عبد سلمان المسلماوي
05/06/2018 12:50:12
transactions and concurrency control in dbm on the topic “advanced database concepts”, there are two primary processes (1) transaction management and (2) concurrency control in database management system (dbms): transaction management (tm) handles all transactions properly in dbms. database transactions are the events or activities such as series of data read/write operations on data object(s) stored in database system. concurrency control (cc) is a process to ensure that data is updatingd correctly and appropriately when multiple transactions are concurrently executed in dbms. why dbms needs a concurrency control? in general, concurrency control is an essential part of tm. it is a mechanism for correctness when two or more database transactions that access the same data or data set are executed concurrently with time overlap. according to wikipedia.org, if multiple transactions are executed serially or sequentially, data is consistent in a database. however, if concurrent transactions with interleaving operations are executed, some unexpected data and inconsistent result may occur. data interference is usually caused by a write operation among transactions on the same set of data in dbms. for example, the lost updating problem may occur when a second transaction writes a second value of data content on top of the first value written by a first concurrent transaction. there are two main kinds of concurrency control mechanisms: ? pessimistic (conservative) concurrency control the pessimistic concurrency control delays the transactions if they conflict with other transactions at some time in the future by locking or a time-stamping technique. optimistic concurrency control the optimistic concurrency control assumes that the conflict is rare, allows concurrent transactions to proceed without imposing delays to ensure serializability then check conflict only at the end, when a transaction commits. notice that there is another mechanism, semi-optimistic technique, which uses lock operations in some situations (if they may violate some rules), and does not lock in other circumstances. the pros and cons of the pessimistic and optimistic concurrency control mechanisms both pessimistic and optimistic concurrency control mechanisms provide different performance, e.g., the different average transaction completion rates or throughput, depending on transaction types mix, computing level of parallelism, and other events. there is a trade-off between the concurrency control techniques. their pros and cons are shown below: for pessimistic concurrency control, the strength is: - guarantee that all transactions can be executed correctly. - data is properly consistent by either rolling back to the previous state (abort operation) or new content (commit operation) when the transaction conflict is cleared. - database is relatively stable and reliable. its weakness is: - transactions are slow due to the delay by locking or time-stamping event. - runtime is longer. transaction latency increases significantly. - throughput or the amount of work (e.g. read/write, updating, rollback operations, etc.) is reduced. for optimistic concurrency control, the strength is: - transactions are executed more efficiently. - data content is relatively safe. - throughput is much higher. its weakness is: - there is a risk of data interference among concurrent transactions since it transactions conflict may occur during execution. in this case, data is no longer correct. - database may have some hidden errors with inconsistent data even conflict check is performed at the end of transactions. - transactions may be in deadlock that causes the system to hang. many users often encounter the data interference issue in database management system in stock markets
in conclusion, concurrency control is one of the primary mechanisms in transaction management to provide integrity of data and safety in dbms. today, with hundred thousand or more transactions in a few minutes, transaction management and concurrency control become much more complex and sophisticated. two pessimistic and optimistic mechanisms are still popular, but other techniques such as semi-optimistic are also applied in dbms for higher performance, better throughput, more accurate results, and faster run time.
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|