Presentation is loading. Please wait.

Presentation is loading. Please wait.

EJBs +XML + Integrity Constraints Data-Object Modeling and Optimization (DOMO) June 2003 Rajesh Bordawekar, Michael Burke, Mukund Raghavachari, Vivek Sarkar,

Similar presentations


Presentation on theme: "EJBs +XML + Integrity Constraints Data-Object Modeling and Optimization (DOMO) June 2003 Rajesh Bordawekar, Michael Burke, Mukund Raghavachari, Vivek Sarkar,"— Presentation transcript:

1 EJBs +XML + Integrity Constraints Data-Object Modeling and Optimization (DOMO) June 2003 Rajesh Bordawekar, Michael Burke, Mukund Raghavachari, Vivek Sarkar, Oded Shmueli

2 A Changing Application Environment Frameworks such as Container-Managed Persistence simplify integration of application logic with databases.  Programmer specifies mapping between Java classes and schema declaratively.  Relational databases have integrity constraints.  XML schemas have integrity constraints.  Application logic may have its own integrity constraints.  There is no mechanism for reasoning about constraints on data given a mapping between language types and relational schema.  Applications may fail when seemingly correct updates are rejected by the database.  Domain constraints and referential integrity constraints. Need to reason about such constraints.

3 Setting db.X. t ejb.X.t Mapping Mapping associates db.X. t and ejb.X.t T → What can be deduced about db originated values based on the schema? XML data Relational data

4 EJBs + XML Current J2EE implementations provide little support for XML data sources. Goals:  Understand integration of XML and EJBs.  Efficient algorithms for instantiating EJBs from XML data sources. E.g., Streaming algorithms.  Focus: Mechanisms for ensuring that XML (and relational) integrity constraints are maintained in application logic. Past Work:  Streaming algorithms for XPath (ICDE 2003).

5 XML Data Bindings XML data is “imported” into the application environment. Often, the data conforms to an XML schema or a DTD. XML schemas support constraints: domain, uniqueness, key. These should be related to relational database and application constraints. Data travels in both directions (“export”).

6 Plans Examine data binding formalisms. Examine XML schema constraints. Analyze their interplay at the application level:  Support static analysis of programs to determine constraint violations.

7 Example: Updating a “ Record" EJB Field SAL is updated in an employee record. SAL is associated with min=10K, max=200K. Two salary ranges: [10,45], [65,200]. May check application code to determine possible violations.

8 Record XML Schema Complex type Union type Restriction

9 Use Cases Reading a database record Writing/Updating a database record Reading an XML element/attribute Writing/Updating an XML element/attribute Assisting CMP/BMP Assisting CMR

10 Using Constraint/Type Information Constraints for the same application may originate in a relational DB, an XML schema, a DTD or other sources. We therefore need to reason about and manipulate constraints originating in various formalisms. Analyze program statically and dynamically to verify that constraints are met.  Failure of a check implies update will fail in DB. Success usually provides no definite information.  Much related Dist. DB literature on the subject.

11 XAOS: XPath Analysis and Optimization for Streaming Xpath-specific Automaton supports streaming XPath processing for forward and backward axes XPath Expression XML Parser XML Document Xpath-specific Automaton Specialized XPath Processor XML Fragments Parsing Events Motivation: XPath lookup is next major bottleneck in XML processing (after parsing) Streaming access is most efficient mode for memory hierarchies and large documents

12 XAOS Example XPATH expression //y[u]//w[ancestor::z/v] XML Document Xpath-specific Automaton Parser + Specialized XPath Processor Root(0) X (1) Y(10) Y(2) Z(11) Z(4) U(9) W(12) V(5) V(6) W(7) W(8) W(3) U(13) Root(0) Y(2) Z(4) U(9) V(5) V(6) W(7) W(8) XDAG: Y Y U U W W V V Z Z Root descendant child descendant Root Y Y Z Z U U V V W W XPath Matchings in XML Document

13 XAOS Scalability: Parsing + XPath Execution times Experiments run on 550 MHz Pentium III, w/ 256MB RAM & Linux 2.2


Download ppt "EJBs +XML + Integrity Constraints Data-Object Modeling and Optimization (DOMO) June 2003 Rajesh Bordawekar, Michael Burke, Mukund Raghavachari, Vivek Sarkar,"

Similar presentations


Ads by Google