Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fabio Grandi DEIS - Univ. of Bologna, Italy

Similar presentations


Presentation on theme: "Fabio Grandi DEIS - Univ. of Bologna, Italy"— Presentation transcript:

1 A Temporal Data Model and Management System for Normative Texts in XML Format
Fabio Grandi DEIS - Univ. of Bologna, Italy Federica Mandreoli, Paolo Tiberio and Marco Bergonzini DII – Univ. of Modena e Reggio Emilia, Italy

2 Dynamics of norms in time
Temporal concerns are ubiquitous in the law domain The ability to model temporal dimensions is essential for the management of evolving norms Temporal database systems Database systems including special support for the time dimension(s) Temporal dimensions: valid time, transaction time, event/decision time and availability time (for advanced applications) There is a much current interest in representing and querying (temporal) XML data

3 Objectives Development of an effective and efficient system where:
dynamics of norms in time is captured norms are represented as XML documents and are available on the Web Approach Definition of a temporal XML model including A temporal XML schema Temporal manipulation operations Design, implementation and evaluation of a system prototype supporting the model

4 The temporal XML data model
Based on the hierarchical organization of normative texts contents-section-article-paragraph At each level of the hierarchy, the history of changes is represented by the versions produced The temporal pertinence is represented by timestamps, i.e. temporal elements encoded as multiple 3-dim intervals (TA) A reference to the modifying (active) norm is added (an_ref) Supports ancestor-descendant inheritance Timestamps of a node are inherited by its descendants Along the hierarchy, redefinitions can only involve a restriction of the temporal pertinence

5 The temporal XML schema
Law Num – R Type – R Publication – R Vt_Start – R Vt_End – O Tt_Start – R Tt_End – O Et_Start – R Et_End – O Publication time time of publication on the Official Journal Validity time time the norm is in force Efficacy time time the norm can be applied Transaction time time the norm is stored in the system Title Contents Vt_Start – R Vt_End – O Tt_Start – R Tt_End – O Et_Start – R Et_End – O An_ref – O Ver TA Num – R Section Num – R Vt_Start – R Vt_End – O Tt_Start – R Tt_End – O Et_Start – R Et_End – O An_ref – O Ver TA Num – R Num – R Heading Article Vt_Start – R Vt_End – O Tt_Start – R Tt_End – O Et_Start – R Et_End – O An_ref – O Ver TA Num – R Heading Paragraph Num – R Vt_Start – R Vt_End – O Tt_Start – R Tt_End – O Et_Start – R Et_End – O An_ref – O Ver TA Num – R

6 An example document <norm num="2624/1999" type="Law">
<title>Cereals Importation</title> <contents publication=" " vt_start=" " tt_start=" " et_start=" " > <article num="1"> <ver num="1"> <ta/ vt_start=" " tt_start=" " tt_end=" " et_start=" " > <ta/ vt_start=" " et_start=" " et_end=" " … > <ta/ vt_start=" " vt_end=" " et_start=" " … > <paragraph num="1"><ver num="1" > …Art. 1 before modification… </ver> </paragraph> … </ver> <ver num="2" an_ref="LD135/2000" > <ta/ vt_start=" " tt_start=" " et_start=" " > <paragraph num="1"><ver num="1"> …Art. 1 after modification… </ver> </paragraph> <paragraph num ="2"><ver num="1"> …Art. 1 after modification… </ver> </paragraph> </article>

7 Querying aspects FOR $a IN path WHERE constraints on $a RETURN const-tree(document($a), temporal specs) constraints can contain keyword-based text selections e.g. contains(//title, ‘cereal’) const-tree Is an operator for the reconstruction of a temporally consistent normative act (involves temporal selections) temporal specs may require a temporal predicate for each of the supported dimensions Defaults: efficacy time = valid time T_DIM CONTAINS now At each level, the text making up the desired version is selected

8 Example of reconstruction (curr. ver.)
<norm num="2624/1999" type="Law"> <title>Cereals Importation</title> <contents publication=" " vt_start=" " tt_start=" " et_start=" " > <article num="1"> <ver num="1"> <ta/ vt_start=" " tt_start=" " tt_end=" " et_start=" " > <ta/ … > <ta/ … > <paragraph num="1"><ver num="1" > …Art. 1 before modification… </ver> </paragraph> … </ver> <ver num="2" an_ref="LD135/2000" > <ta/ vt_start=" " tt_start=" " et_start=" " > <paragraph num="1"><ver num="1"> …Art. 1 after modification… <ver> </paragraph> <paragraph num ="2"><ver num="1"> …Art. 1 after modification… </ver> </paragraph> </article> ( NOT INCLUDED )

9 changeText operation Performs a lossless update of documents Requires
The path of the element to be substituted The validity and efficacy timestamps to be assigned to the new version The new text (empty if abrogation) Steps Adds a new version Updates timestamps of the sibling versions Updates timestamps of ancestor and descendant versions (if necessary)

10 changeTime operation Modifies the timestamps of an existing document portion Requires The path of the element under modification The temporal coordinates of the version to be modified (vt and et, tt=now) The new values of the validity and efficacy Steps Extend the timestamps of the selected version Updates timestamps of the sibling versions Updates timestamps of descendant and ancestor versions (if necessary)

11 The system architecture
? XML Document XML Documents Query XML Documents (Textual or Temporal Change) Preprocessor Query Processor Update Processor tnorms(ID,XML-DOC,PUBLICATION, VT-START,VT-END,TT-START,TT-END, ET-START,ET-END) XML repository Inverted Index Inherited timestamps are explicited at every level of the document hierarchy (in the preprocessing phase) Timestamp attribute of tnorms have the same values of the timestamping tags associated with the contents tag Inverted index built on title, heading and paragraph

12 Query processing Oracle 9i XML Engine Query XML Documents XML
FOR $a IN //article/title WHERE contains($a, ‘cereals’) RETURN const-tree(document($a), VALID CONTAINS now) XML Documents Preprocessing Reconstruction SELECT L.XML-DOC.extract(‘//article’).getStringVal() FROM tnorms L WHERE VT-START <= ‘07-NOV-2003’ AND VT-END >= ‘07-NOV-2003’ AND TT-START … AND ET-START … AND CONTAINS(L.XML-DOC, ‘cereals WITHIN title’)>0 const-tree(document($a), VALID CONTAINS now AND TRANSACTION …) Oracle 9i XML Engine tnorms(ID,XML-DOC,PUBLICATION, VT-START,VT-END,TT-START,TT-END, ET-START,ET-END) XML repository Inverted Index

13 Evaluation benchmark Six different query types Three XML document sets
1000 documents (24MB) 2000 documents (50MB) 5000 documents (120MB) Variable document size min = 2KB avg = 24KB max = 125KB Six different query types Queries on keywords Q1 – keywords in contents Q2 – keywords in type and contents Temporal queries Q3 – conditions on publication, validity and transaction time Mixed queries Q4, Q5, Q6 – with keywords and temporal conditions

14 Performance evaluation
Preprocessing improves the performance of temporal queries (with a negligible overhead for non-temporal queries) The inverted index is effective only when very selective keywords are specified The introduction of temporal elements (instead of intervals) substantially improves the reconstruction phase by reducing document size and memory required naïve approach, without preprocessing and metadata

15 Conclusions and Future Work
We defined a temporal XML data model which Captures the dynamics of norms in time Allows their multiple versions to be represented Defines the interaction between temporal dimensions and the document structural hierarchy Is equipped with three basic operators We designed, implemented and evaluated a prototype built on top of a commercial DBMS Future developments Study of optimized implementation solutions (e.g. based on decomposition of XML documents, execution of structural joins, etc.)


Download ppt "Fabio Grandi DEIS - Univ. of Bologna, Italy"

Similar presentations


Ads by Google