Presentation is loading. Please wait.

Presentation is loading. Please wait.

Concurrency control in XML databases Ali Abbasi. Concurrency in XML Bases XML : standard format of data exchange on the internet XML docs is stored in.

Similar presentations


Presentation on theme: "Concurrency control in XML databases Ali Abbasi. Concurrency in XML Bases XML : standard format of data exchange on the internet XML docs is stored in."— Presentation transcript:

1 Concurrency control in XML databases Ali Abbasi

2 Concurrency in XML Bases XML : standard format of data exchange on the internet XML docs is stored in databases Concurrency control is an important function of a DB Traditional CC protocols are not tailored to XML database systems New protocols designed based on different access methods : DOM, XPath,...

3 XPath XPath models an XML document as a tree of nodes. XPath expressions are used to indicate the requested nodes in the XML tree An Xpath exp : /S 1,j /S 2,j /S 3,j /.../S m,j S i,j : Axis::NodeTest[Predicate]

4 Non-conflicting conditions A transaction T is a sequence of pairs of operations O j (x) and location path L j Operations are : pass-by, read, write, insert, delete For any x,y,, and, For any x,y,, For any y, if there exists a location step S in location path L in T i such that x is not a member of R(S) and R I (S),,,

5 Conflicting conditions,,, For any x, if there exists a location step S in location path L such that x is a member of R(S) or R I (S),,,

6 XLP XLP is a lock-based protocol with five lock modes, denoted by P-, R-, W-, I- and D-locks XLP is 2PL Nodes in the M-set of S i,j (M(S i,j ) and M I (S i,j )) are all locked by P-locks before performing the Node-Test and Predicate Granularity Rules :  (1) Lock granularity of P-, R-, I-, or W-locks on a node is only the node itself.  (2) Lock granularity of D-locks on a node includes the whole subtree rooted at the node.

7 XLP Compatibility Rule.  A particular type of lock on location step S i can be granted as long as the compatibility matrix is respected. Release Rules  R-, W-, I- or D-locks on N d (L j ) can only be released in the shrinking phase of a transaction.  P-locks on nodes in the set are released only in the shrinking phase;  Other P-locks on are released after location step S i,j finishes

8 Properties XLP ensures conflict serializability. XLP outperforms 2PL owing to the earlier release of P- locks and lower lock conflicts according to its lock compatibility matrix. XLP fully supports most XPath’s axis operations phantom problem may exist in some schedules under XLP

9 LWMGL A lock-based CC protocol XML documents have a hierarchical structure Two hierarchical locking protocol: TL, MGL None of them a is an appropriate solution LWMGL is a hybrid of MGL and TL It’s goal is preventing phantoms and providing high concurrency

10 pseudo-conflict: T 1 retrieves all the /description elements T 2 inserts price element Pseudo-conflict

11 phantom T 1 retrieves all the elements in /Books/Book T 2 inserts Discount

12 XIET data model The element table schema E has a set of element records E = {indexing group, elements, rowID} The data table schema D has a set of data records D = {rowID, TextString} indexing group I = {G,S,D}

13 LWMGL Protocol Find the target element by using GSD indices Acquire S_locks for reading each element where the target element traverses subelements Acquire X_locks on the leaf element in order to update the value in the data table Acquire IX_lock on the parent for inserting a node for prohibiting phantom

14 LWMGL Protocol Acquire IX locks from the root element to target element in order to delete an element in the element table so as to prohibit parent element deletion from other transactions during deletion. Follow the order in locking from the parent element of the subelements to their child. In an unlocking fashion, follow it in the opposite direction, i.e., from the child element to the parent of the subelements.

15 References Kuen-Fang Jea, Shih-Ying Chen, A High concurrency XPath-based locking protocol for XML Databases, In: Elsevier Science,2005. Yonggoo Choi, Songchum Moon, Lightweight multigranularity locking for transaction management in XML database systems, In: Elsevier Science,2005. Grabs, T., Bo¨hm, K., Schek, H.-J., XMLTM: efficient transaction management for XML documents. In: Proceedings of the ACM International Conference on Information and Knowledge Management, CIKM 2002

16 L :/child::a/descendant::d[position()=2] M(S 1,1 )=R (S 1,1 )= {a}, M I (S 1,1 ) and R I (S 1,1 ) are empty M I (S 2,1 )={b 2, b 3, c 1, c 2 }, M(S 2,1 )={d 1, d 2, d 3 } R I (S 2,1 )={b 2, c 1 }, R(S 2,1 )={d 2 }.


Download ppt "Concurrency control in XML databases Ali Abbasi. Concurrency in XML Bases XML : standard format of data exchange on the internet XML docs is stored in."

Similar presentations


Ads by Google