Pertemuan 15 tugas

Tugas 15.1: Review/Homework

Kerjakan halaman 601 Review Question 19.1 – 19.4, 19.7 – 19.8

19.1 Explain what is meant by a transaction. Why are transactions important units of operation in a DBMS?

Jawab:

Transaction adalah kegiatan atau rangkaian kegiatan yang dilakukan oleh user atau application, dimana mereka mengakses atau mengubah isi dari database.
Transaction amat penting dalam sebuah DBMS karena transaksi yang baik akan meningkatkan kualitas database dan pengeksekusian transaction yang tepat akan membuat database lebih konsisten.

19.2 The consistency and reliability aspects of transactions are due to the ‘ACIDity’ properties of transactions. Discuss each of these properties and how they relate to the concurrency control and recovery mechanism. Give examples to illustrate your answer.

Jawab:

Atomicity ‘All or nothing’ property.
Consistency Must transform database from one consistent state to another.
Isolation Partial effects of incomplete transactions should not be visible to other transactions.
Durability Effects of a committed transaction are permanent and must not be lost because of later failure.

Consistency artinya adalah sebuah database haruslah berubah dai suatu kondisi yang konsisten ke kondisi lainnya namun tetap konsisten.

Reliability artinya adalah efek dari suatu transaksi adalah permanent dan tidak akan hilang apabila terjadi kegagalan pada proses setelahnya.

Kedua hal ini sangat berkaitan dengan concurrency control dan recovery mechanism. Contohnya :
Jika suatu database konsisten maka meminimalkan kemungkinan terjadi masalah pada concurrency contihnya deadlock dan bila suatu database permanent maka jika ada kegagalan dalam suatu transaksi maka hal itu tidak akan mempengaruhi database sebelumnya.

19.3 Describe, with examples, the types of problem that can occur in a multi-user environment when concurrent access to the database is allowed.

Jawab:
Lost update problem->update override by another user

the uncommitted dependency problem->one transaction can see intermediate result of other transaction before its commited

and the inconsistent analysis problem->transaction reads several values but second transaction updates some of them during the executions

19.4 Give full details of mechanism for concurrency control that can be used to ensure that the types of problem discussed in Question 19.3 cannot occur. Show how the mechanism prevents the problem illustrated from occurring. Discuss how the concurrency control mechanism interacts with the transaction mechanism.

Jawab:
Many methods for concurrency control exist. Major methods, which have each many variants, include:
• Two phase locking-> In databases and transaction processing, two-phase locking, (2PL) is a concurrency control locking protocol, or mechanism, which guarantees serializability. It is also the name of the resulting class (set) of transaction schedules. Using locks that block processes, 2PL may be subject to deadlocks that result from the mutual blocking of two transactions or more.
• Conflict (serializability, precedence) graph checking-> In databases and transaction processing, a transaction schedule (history) is serializable, has the Serializability property, if its outcome (the resulting database state, the values of the database’s data) is equal to the outcome of its transactions executed serially, i.e., sequentially without overlapping in time. Transactions are normally executed concurrently (they overlap), since this is the most efficient way. Serializability is the major correctness criterion for concurrent transactions’ executions. It is considered the highest level of isolation between transactions, and plays an essential role in concurrency control. As such it is supported in all general purpose database systems. A precedence graph, also named conflict graph and serializability graph, is used in the context of concurrency control in databases.
• Timestamp ordering-> Every timestamp value is unique and accurately represents an instant in time. No two timestamps can be the same. A higher-valued timestamp occurs later in time than a lower-valued timestamp.
• Commitment ordering-> In databases and transaction processing, Commitment ordering (or Commit ordering; CO) is a serializability technique, as well as the name of the resulting transaction schedule (history) property. In a CO compliant schedule the chronological order of commitment events of transactions is compatible with the precedence order of the respective transactions. CO is a broad special case of conflict serializability, and effective means (reliable, high-performance, distributed, and scalable) to achieve global serializability across any collection of database systems that possibly use different concurrency control mechanisms (CO also makes each system serializability compliant, if not already). Achieving this has been characterized as open problem until the introduction of CO in 1991. Each not-CO-compliant database system is augmented with a CO component which orders the commitment events for CO compliance, with neither data-access nor any other transaction operation interference. As such CO provides an atomic commitment protocol based, low overhead, general solution for global serializability, instrumental for global concurrency control of multi database systems and other transactional objects, possibly highly distributed. CO is the most general property (a necessary condition) that guarantees global serializability, if the database systems involved do not share concurrency control information beyond atomic commitment protocol (unmodified) messages (the database systems are autonomous). It generalizes the popular Strong strict two phase locking (SS2PL) property, which in conjunction with the Two phase commit protocol is the de facto standard to achieve global serializability across (SS2PL based) database systems. As a result CO compliant database systems (with any, different concurrency control types) can transparently join such SS2PL based solutions for global serializability.
• Multiversion concurrency control-> Multiversion concurrency control (abbreviated MCC or MVCC), in the database field of computer science, is a concurrency control method commonly used by database management systems to provide concurrent access to the database.
Index concurrency control (for synchronizing indexes)-> Index locking is a procedure in which running one task on a database table blocks all access by other tasks to the entire table. With index locking it may be necessary to lock the index build for a column, not just the data items themselves. Index locking prevents conflicts between functions by ensuring that a table is not modified while a function is attempting to use it.
– Lost update problem.
Loss of T2’s update avoided by preventing T1 from reading balx until after update.

– Uncommitted dependency problem.
Problem avoided by preventing T3 from reading balx until after T4 commits or aborts.

– Inconsistent analysis problem.
Problem avoided by preventing T6 from reading balx and balz until after T5 completed updates.

19.7 Discuss the types of problem that can occur with locking-based mechanism for concurrency control and the actions that can be taken by a DBMS to prevent them.

Jawab:

Deadlock adalah suatu kondisi di mana dua atau lebih transaksi saling tunggu menunggu lock dari transaksi lainnya dilepaskan.

Langkah yang dapat dilakukan oleh DBMS untuk mencegahnya adalah membatalkan salah satu atau lebih transaksi tersebut.

19.8 Why would two-phase locking not be an appropriate concurrency control scheme for indexes? Discuss a more appropriate locking scheme for tree-based indexes.

Jawab:
Concurrency control for an index structure can be managed by treating each page of the index as
a data item and applying the 2PL protocol. However, since indexes are likely to be frequently ac-
cessed, particularly the higher levels of trees (as searching occurs from the root downwards), this
simple concurrency control strategy may lead to high lock contention. Therefore, a more effi-
cient locking protocol is required for indexes.
Concurrency kontrol untuk indeks struktur dapat dikelola oleh memperlakukan setiap halaman indeks sebagai data item dan menerapkan 2PL protokol. Namun,dikarenakan indeks yang mungkin sering diakses, khususnya yang lebih tinggi dari tree based indexes (seperti pencarian terjadi dari root ke bawah), ini
sederhana concurrency kontrol strategi dapat mengakibatkan high lock contention.
Karena itu, yang lebih efisien adalah penguncian protokol yang diperlukan untuk indeks.

Dapat menggunakan strategi penguncian berikut:
(1) Untuk pencarian, mendapatkan kunci pada node bersama dimulai pada root dan melanjutkan ke bawah
sepanjang jalan yang diperlukan. Melepaskan kunci pada node sekali kunci telah didapatkan
pada node anak.
(2) Untuk insertions, sebuah pendekatan konservatif akan eksklusif untuk mendapatkan kunci pada semua node
seperti yang kita turun tree ke node daun yang akan dimodifikasi. Ini memastikan bahwa perpecahan di edge dapat memperkembangbiakkan node all the way up the ke akar pohon. Namun, jika seorang anak adalah node
tidak lengkap kunci induk pada node dapat dilepaskan. Pendekatan yang lebih optimis akandipakai bersama-sama untuk mendapatkan kunci pada semua node seperti yang kita turun ke daun node yang akan diubah, dimana kita mendapatkan kunci eksklusif pada daun node itu sendiri. Jika node daun yang terbelah, kita bersama-upgrade kunci induk pada node ke eksklusif kunci. Jika node ini juga memiliki untuk memisahkan, kami terus meningkatkan kunci berikutnya pada tingkat yang lebih tinggi. Dalam sebagian besar
kasus, yang memisahkan tidak membuat ini diperlukan pendekatan yang lebih baik.

admin post

9 Responses to “Pertemuan 15 tugas”

  1. KrisBelucci says:

    Hi, good post. I have been wondering about this issue,so thanks for posting.

  2. Kelly Brown says:

    Hi, gr8 post thanks for posting. Information is useful!

  3. Hi, gr8 post thanks for posting. Information is useful!

  4. I don’t know what to say!
    —————————————
    signature: prevacid 30mg se6f9se88ieeelqpgm

  5. BarUttero says:

    We must have lunch together.
    —————————————
    signature: order zithromax gr99r8gggr999ikgm

  6. Extenze says:

    I think your blog need a new wordpress template. Downalod it from http://templates.wordpressguru.in, The site has nice and unique wordpress templates.

  7. QuiemiFeeriut says:

    Hope so.
    —————————————
    signature: discount nizoral e8gg9e9898gkejijijilmeoroio

  8. keednekly says:

    Despite…
    —————————————
    signature: prilosec online fge55fe9e9e9f8fufjfjfjfffex

  9. Glee says:

    Usually I don’t make comments frivolously, but I want say “Happy Thanksgiving” to everyone!

Leave a Reply