1 / 22

EReX: A Conceptual Model for XML

EReX: A Conceptual Model for XML. Murali Mani XSym, 2004 Aug 30, 2004. Motivations behind this work. Goal 1: Many different schema languages for XML: DTD, RELAX NG, W3C XML Schema Different structural specification characteristics (subclasses of regular tree grammars).

adlai
Download Presentation

EReX: A Conceptual Model for XML

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EReX: A Conceptual Model for XML Murali Mani XSym, 2004 Aug 30, 2004

  2. Motivations behind this work • Goal 1: • Many different schema languages for XML: DTD, RELAX NG, W3C XML Schema • Different structural specification characteristics (subclasses of regular tree grammars). • Also different constraint specification characteristics. • Which XML schema language is good for database applications? • Goal 2: • An application wants to design an XML logical schema. What is the process? DSRG, WPI

  3. Deliverables • EReX (ER extended for XML) • A conceptual model for modeling any database application. • XML schema language characteristics needed for database applications. DSRG, WPI

  4. Binary 1:n relationships Binary m:n relationships ER Model DSRG, WPI

  5. N-ary relationships Recursive relationships ER Model DSRG, WPI

  6. Extensions to ER: Categories PersonCity, PersonZip are categories of Person Book, Paper are categories of Article • Note: • Article does not have a key attribute. • A is category of B  any instance of A is also instance of B DSRG, WPI

  7. PersonCity  PersonZip =  PersonCity  PersonZip = Person personBook  personPaper =  personBook  personPaper = Person confPaper  journalPaper =  confPaper  journalPaper = Paper Extensions to ER: Coverage Constraints DSRG, WPI

  8. Extensions to ER: Order constraints DSRG, WPI

  9. EReX: Summary • EReX = ER extended with categories, coverage constraints and order constraints. • Any database applications can be modeled in EReX. • Implications • Global Document order is not significant for our applications. • Rather, what is significant is order specified in the relationship. DSRG, WPI

  10. XGrammar • Structural specification using regular tree grammar. • Constraint specification on types (rather than path expressions). DSRG, WPI

  11. XGrammar Example Library  library (Person*) Person  person (@name, ((@city, @state) + @zip), (Book* + Paper*), Review*) Book  book (@btitle, @ISBN, @BID) Paper  paper (@ptitle, @year?, @PID) Review  review (@article, @rating) Constraints: key (Person) = <@name>; key (Book) = <@ISBN>; key (Paper) = <@ptitle>; key (Review) = <parent::person/@name, @article> article::IDREF REFERENCES (Book + Paper) DSRG, WPI

  12. EReX schema  XML schema – binary 1:n relationship types • Parent-child: • Professor  professor (@pname, @age, Student*) • Student  student (@sname, @year) • ID/IDREF • Professor  professor (@pname, @age, @PID) • Student  student (@sname, @year, @advisor) • advisor::IDREF REFERENCES (Professor) • Key/Foreign Key • Professor  professor (@pname, @age) • Student  student (@sname, @year, @advisor) • Student (advisor) REFERENCES Professor (@pname) DSRG, WPI

  13. EReX schema  XML Schema – binary m:n relationship types • Person  person (@name, @zip, Review*) • Review  review (@rating, @BookRef) • Book  book (@ISBN, @title, @year, @BID) • BookRef::IDREF REFERENCES (Book) DSRG, WPI

  14. EReX schema  XML Schema – ternary relationship types • Company  company (@name, Supply+) • Supply  supply (@ProductRef, @CityRef, @quantity) • Product  product (@name, @ProductID) • City  city (@name, @CityID) • ProductRef::IDREF REFERENCES (Product) • CityRef::IDREF REFERENCES (City) DSRG, WPI

  15. EReX schema  XML Schema – recursive relationship types • Part  part (@name, Part*, @qty?) DSRG, WPI

  16. PersonCity  PersonZip =  PersonCity  PersonZip = Person EReX schema  XML Schema – coverage constraints • Person  person (@name, (@city, @state) + @zip)) DSRG, WPI

  17. confPaper  journalPaper =  confPaper  journalPaper = Paper EReX schema  XML Schema – coverage constraints • Conference  conference (@name, @venue, Paper*) • Journal  journal (@name, @publisher, Paper*) • Paper  paper (@title) DSRG, WPI

  18. personBook  personPaper =  personBook  personPaper = Person EReX schema  XML Schema – coverage constraints • Person  person (@name, (Book+ + Paper+)) • Book  book (@isbn, @title) • Paper  paper (@title, @journal) DSRG, WPI

  19. EReX schema  XML Schema – order constraints • Order in the XML model • Person  person (@name, @address, Book*) • Using order attributes • Person  person (@name, @address, @PersonID) • Book  book (@isbn, @title, @PersonRef, @order) • PersonRef::IDREF REFERENCES (Person) DSRG, WPI

  20. EReX schema  XML Schema – Summary • Translation algorithm captures all entity types, relationship types. • It captures most cardinality constraints (some minimum cardinality constraints may be lost). • It captures all categories • It captures all order constraints. • It captures most coverage constraints (some coverage constraints may be lost). • Resulting XML Schema • Single type tree grammar. • Constraints specified on types. DSRG, WPI

  21. Acknowledgements: Antonio Badia, University of Louisville, Kentucky Dongwon Lee, PennState University Members of DSRG and colleagues at WPI DSRG, WPI

  22. Thank You URL: http://www.cs.wpi.edu/~mmani Email: mmani@cs.wpi.edu Questions? DSRG, WPI

More Related