During this assignment we take a deeper look at two of the XML encodings that have been presented in the lecture. The document doc.xml serves as the input for several of the exercises.
<A> <B><C/><D/><E><F/><G/></E></B> <H><I/><J/></H> </A>
insert node <X1><X2/></X1> into //C
The ORDPATH (O’Neil et al. ORDPATHs: Insert-Friendly XML Node Labels. SIGMOD 2004) encoding is a hierarchic, dynamic, prefix-labeling scheme inspired by the Dewey Decimal Classification. In contrast to Pre/Dist/Size, ORDPATH requires no adjustment of existing labels after the insertion or deletion of nodes.
insert node <X3/> before //G
insert node <X1/> after //F
insert node <X2/> after //X1
1.-353.21.-25
0100111000000010100111100010000000101100001
ORDPATH and Pre/Dist/Size have obviously very different qualities. Deciding to use one or the other as the foundation for an XML database is highly dependent on the use case and has a number of consequences. Based on your experiences so far, give two advantages for each of the encodings.