Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Databases – do they really exist? Jan Erik Kofoed BIBSYS Library Automation ELAG 2005 at CERN, Geneva.

Similar presentations


Presentation on theme: "XML Databases – do they really exist? Jan Erik Kofoed BIBSYS Library Automation ELAG 2005 at CERN, Geneva."— Presentation transcript:

1 XML Databases – do they really exist? Jan Erik Kofoed BIBSYS Library Automation ELAG 2005 at CERN, Geneva

2 2005-06-03 2 ELAG 2005 Design goals for XML 1.XML shall be straightforwardly usable over the Internet. 2.XML shall support a wide variety of applications. 3.XML shall be compatible with SGML. 4.It shall be easy to write programs which process XML documents. 5.The number of optional features in XML is to be kept to the absolute minimum, ideally zero. 6.XML documents should be human-legible and reasonably clear. 7.The XML design should be prepared quickly. 8.The design of XML shall be formal and concise. 9.XML documents shall be easy to create. 10.Terseness in XML markup is of minimal importance.

3 2005-06-03 3 ELAG 2005 A simple example Henrik Ibsen The Wild Duck London 1890

4 2005-06-03 4 ELAG 2005 A relational model for the example book id (primary key publ-id (foreign key) author title published publ-id (primary key) place year

5 2005-06-03 5 ELAG 2005 Realisation as tables idpubl-idauthortitle 2314560001Henrik Ibsen The Wild Duck publ-idplaceyear 0001London1890 book published

6 2005-06-03 6 ELAG 2005 Realisation as DOM - Document Object Model book id autho r title publishedplace year 231456 Henrik Ibsen The Wild Duck London 1890 element nodeattribute node text node

7 2005-06-03 7 ELAG 2005 Important W3C XML technologies XML Schema –defining database schema, instance validation XPath –query expressions –addressing content XQuery –a new query language for XML –based on XPath and XML Schema type hierarchy Namespaces in XML –qualification of content

8 2005-06-03 8 ELAG 2005 XML Schema – text representation

9 2005-06-03 9 ELAG 2005 XML Schema – graphical representation

10 2005-06-03 10 ELAG 2005 Assigning schema to a XML document <book id="231456" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="book.xsd"> Henrik Ibsen The Wild Duck London 1890

11 2005-06-03 11 ELAG 2005 XQuery for $query in doc("book.xml") where $query/book/author = "Henrik Ibsen" return {$query/book/title} The Wild Duck The query: gives this result: XPath

12 2005-06-03 12 ELAG 2005 Native XML database 1.Defines a (logical) model for an XML document -- as opposed to the data in that document -- and stores and retrieves documents according to that model. 2.Has an XML document as its fundamental unit of (logical) storage. 3.Is not required to have any particular underlying physical storage model.

13 2005-06-03 13 ELAG 2005 SAG Tamino XML Server 1.Database Schema based on W3C XML Schema. 2.The basic record-type is a well-formed XML document type. Different document types can be grouped into collections. 3.Stores data as serialised DOM objects.

14 2005-06-03 14 ELAG 2005 Tamino System Architecture

15 2005-06-03 15 ELAG 2005 ORACLE XML Database Includes a native XML datatype SQL operators on XML content Support for W3C XML Schema XML/SQL duality –XML operations on relational data –SQL operations on XML data Support for XPath and SQL/XML XML mapped to file/folder structure

16 2005-06-03 16 ELAG 2005 ORACLE – storage options

17 2005-06-03 17 ELAG 2005 ORACLE – Create statement CREATE TABLE purchase_order_table ( po_number NUMBER(16), purchase_order XMLTYPE )

18 2005-06-03 18 ELAG 2005 ORACLE – Insert statement INSERT INTO purchase_order_table VALUES (1234, XMLTYPE( ' BLAKE-2002-015 David E. Blake BLAKE S30 ‘ ) )

19 2005-06-03 19 ELAG 2005 ORACLE – Select statement BLAKE-2002-015 David E. Blake BLAKE S30 SELECT extractValue(p.purchase_order,'/PurchaseOrder/User') FROM purchase_order_table p WHERE existsNode(p.purchase_order,'/PurchaseOrder[CostCenter="S30"]') = 1 EXTRACTVALUE(P.PURCHASEORDER,’/PURCHASEORDER/USER’) ----------------------------------------------------------------------------------------------------------- BLAKE XPath Database content: SQL query: Result:

20 2005-06-03 20 ELAG 2005 SQL 2003 and SQL/XML New ANSI/ISO SQL standard: Information technology — Database languages — SQL — Part 14: XML-Related Specifications (SQL/XML). Final comittee draftFinal comittee draft –new XML type –mapping between SQL- and XML-constructs –functions for generating XML from SQL data.

21 2005-06-03 21 ELAG 2005 XML database implementations Ronald Bourret: XML Database ProductsXML Database Products Native XML databases –24 commercial –14 open source XML enabled databases –mostly RDBMS –16 commercial XML Servers –mostly based on RDBMS –19 commercial –5 open source

22 2005-06-03 22 ELAG 2005 XML Databases at BIBSYS Software: Tamino XML Server from Software AG –Native XML database –Supports XML Schema, Namespaces, XPath, and XQuery –Stores both XML and binary objects (images, video a.o.) –Communication based on HTTP –Uses Apache web server as frontend –Java API used for programming BIBSYS Galleri –a database of images BIBSYS Subject Portal –a metadata database for high quality web resources

23 2005-06-03 23 ELAG 2005 BIBSYS Galleri a database of images metadata in MARC wrapped in XML images stored in JPEG format (nonXML data) Database schema generated from DTD (Document Type Definition) XPath used as query language XML content transfomed using XSLT into HTML for presentation URL: http://bilde.bibsys.nohttp://bilde.bibsys.no

24 2005-06-03 24 ELAG 2005 BIBSYS Galleri – xml format (extract) 2002-04-27 IJGR UBiT topografisk VII-Uhj md-004680A Prospektkort s/h Hovde, L.E. forlag Olav Tryggvasons gate fra Bakke bro med trikk og hest.

25 2005-06-03 25 ELAG 2005 BIBSYS Subject Portal Metadata for high quality web resources Uses a subject hierarchy based on Dewey Data in XML using several namespaces Database schema written as several XML Schemas, one for each namespace XQuery (working draft from 2002-08-16) used as query language URL: http://emneportal.bibsys.nohttp://emneportal.bibsys.no

26 2005-06-03 26 ELAG 2005 BIBSYS Subject portal – xml format (extract) 983870854-8343 godkjent Cognitive Psychology Online Laboratory : CogLab BM http://coglab.wadsworth.com/ FREEE 2001-03-06

27 2005-06-03 27 ELAG 2005 Conclusion Two main kind of XML Databases –native –RDBMS with extention XML databases well suited for storing hierarchial structures Work in progress to join SQL and XML based functionality DBMS will in future handle relational data and xml base data equally well Yes, XML databases, - indeed exist!


Download ppt "XML Databases – do they really exist? Jan Erik Kofoed BIBSYS Library Automation ELAG 2005 at CERN, Geneva."

Similar presentations


Ads by Google