XML- Xpath and Xquery

Total Page:16

File Type:pdf, Size:1020Kb

XML- Xpath and Xquery 4/12/17 2 Announcements (Wed., Apr. 12) • HomeworK #4 due Monday, April 24, 11:55 pm • 4.1, 4.2, 4.3, X1 is posted XML- • Please start early XPath and XQuery • There may be another extra credit problem Introduction to Databases • Projects CompSci 316 Spring 2017 • keep working on them and write your final report • Demo in the weeK of April 24 • Google Cloud use? • If anyone is planning to use or using google cloud for HW/project, please send me an email 3 4 Approaches to XML processing • Text files/messages • Specialized XML DBMS • Tamino (Software AG), BaseX, eXist, Sedna, … Relational Mapping • Not as mature as relational DBMS • Relational (and object-relational) DBMS • Middleware and/or extensions • IBM DB2’s pureXML, PostgreSQL’s XML type/functions… 5 6 Mapping XML to relational 1. Node/edge-based: schema • Store XML in a column • Element(eid, tag) • Simple, compact • Attribute(eid, attrName, attrValue) Key: (eid, attrName) • CLOB (Character Large OBject) type + full-text indexing, or better, special XML type + functions • Attribute order does not matter • Poor integration with relational query processing • ElementChild(eid, pos, child) Keys: (eid, pos), (child) • Updates are expensive • pos specifies the ordering of children • Alternatives? • child references either Element(eid) or Text(tid) • Schema-oblivious mapping: ← Focus of this lecture well-formed XML → generic relational schema • Text(tid, value) 1. Node/edge-based mapping for graphs • tid cannot be the same as any eid 2. Interval-based mapping for trees F 3. Path-based mapping for trees Need to “invent” lots of id’s • Schema-aware mapping: FNeed indexes for efficiency, e.g., Element(tag), valid XML → special relational schema based on DTD Text(value) 1 4/12/17 7 8 Node/edge-based: example Node/edge-based: simple paths <bibliography> ElementChild <book ISBN="ISBN-10" price="80.00"> eid pos child <title>Foundations of Databases</title> Element • //title <author>Abiteboul</author> eid tag e0 1 e1 <author>Hull</author> • SELECT eid FROM Element WHERE tag = 'title'; e0 bibliography e1 1 e2 <author>Vianu</author> <publisher>Addison Wesley</publisher> e1 book e1 2 e3 • //section/title <year>1995</year> e1 3 e4 </book>… e2 title • SELECT e2.eid </bibliography> e3 author e1 4 e5 e1 5 e6 FROM Element e1, ElementChild c, Element e2 e4 author WHERE e1.tag = 'section' e5 author e1 6 e7 eid attrName attrValue AND e2.tag = 'title' Attribute e6 publisher e2 1 t0 e1 ISBN ISBN-10 e7 year e3 1 t1 AND e1.eid = c.eid e1 price 80 e4 1 t2 AND c.child = e2.eid; e5 1 t3 tid value Text e6 1 t4 FPath expression becomes joins! t0 Foundations of Databases e7 1 t5 t1 Abiteboul • Number of joins is proportional to the length of the path t2 Hull expression t3 Vianu t4 Addison Wesley t5 1995 9 10 Node/edge-based: complex paths Node/edge-based: descendent-or-self • //bibliography/book[author="Abiteboul"]/@price • //book//title • SELECT a.attrValue FROM Element e1, ElementChild c1, • Requires SQL3 recursion Element e2, Attribute a • WITH RECURSIVE ReachableFromBook(id) AS WHERE e1.tag = 'bibliography' ((SELECT eid FROM Element WHERE tag = 'book') AND e1.eid = c1.eid AND c1.child = e2.eid UNION AND e2.tag = 'book' (SELECT c.child AND EXISTS (SELECT * FROM ElementChild c2, some author of e2 FROM ReachableFromBook r, ElementChild c Element e3, ElementChild c3, Text t WHERE r.eid = c.eid)) WHERE e2.eid = c2.eid AND c2.child = e3.eid is ’Abiteboul’ AND e3.tag = 'author' SELECT eid AND e3.eid = c3.eid AND c3.child = t.tid FROM Element AND t.value = 'Abiteboul') WHERE eid IN (SELECT * FROM ReachableFromBook) AND tag = 'title'; AND e2.eid = a.eid AND a.attrName = 'price'; 11 12 2. Interval-based: schema Interval-based: example 1<bibliography> 2<book ISBN="ISBN-10" price="80.00"> bibliography 1,999,1 • Element(left, right, level, tag) 3<title>4Foundations of Databases</title>5 6<author>7Abiteboul</author>8 • left is the start position of the element 9<author>10Hull</author>11 book 2,21,2 12<author>13Vianu</author>14 15<publisher>16Addison Wesley</publisher>17 • right is the end position of the element 18<year>191995</year>20 </book>21… • level is the nesting depth of the element </bibliography>999 • Key is left title author author author publisher year • Text(left, right, level, value) 3,5,3 6,8,3 9,11,3 12,14,3 15,17,3 18,20,3 • Key is left FWhere did ElementChild go? • Attribute(left, attrName, attrValue) • � is the parent of � iff: • Key is (left, attrName) $ % [�$.left, �$.right] ⊃ [�%.left, �%.right], and �$.level = �%.level − 1 2 4/12/17 13 14 Interval-based: queries Summary so far • //section/title Node/edge-based vs. interval-based mapping • SELECT e2.left FROM Element e1, Element e2 WHERE e1.tag = 'section' AND e2.tag = 'title' AND e1.left < e2.left AND e2.right < e1.right • Path expression steps AND e1.level = e2.level-1; • Equality vs. containment join FPath expression becomes “containment” joins! • Descendent-or-self • Number of joins is proportional to path expression length • Recursion required vs. not required • //book//title • SELECT e2.left FROM Element e1, Element e2 WHERE e1.tag = 'book' AND e2.tag = 'title' AND e1.left < e2.left AND e2.right < e1.right; FNo recursion! 15 16 3. Path-based mapping Label-path encoding: queries Label-path encoding: paths as strings of labels • Simple path expressions with no conditions • Element(pathid, left, right, …), Path(pathid, path), //book//title … • Perform string matching on Path • Join qualified pathid’s with Element • path is a string containing the sequence of labels on a path starting from the root • //book[publisher='Prentice Hall']/title • Why are left and right still needed? • Evaluate //book/title • Evaluate //book/publisher[text()='Prentice Hall'] Element Path • Must then ensure title and publisher belong to the same pathid left right … pathid path 1 1 999 … 1 /bibliography book (how?) 2 2 21 … 2 /bibliography/book FPath expression with attached conditions needs to be 3 3 5 … 3 /bibliography/book/title broKen down, processed separately, and joined bacK 4 6 8 … 4 /bibliography/book/author 4 9 11 … … … 4 12 14 … … … … … 17 18 Another Path-based mapping Dewey-order encoding: queries Dewey-order encoding • Examples: • //title Each component of the id represents the order of //section/title the child within its parent //book//title //book[publisher='Prentice Hall']/title bibliography 1 • WorKs similarly as interval-based mapping • Except parent/child and ancestor/descendant relationship are book 1.1 1.2 1.3 1.4 checked by prefix matching 1.4.1 1.4.2 Element(dewey_pid, tag) title author author author publisher year Text(dewey_pid, value) 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 Attribute(dewey_pid, attrName, attrValue) 3 4/12/17 19 20 XSLT • XML-to-XML rule-based transformation language • Used most frequently as a stylesheet language • An XSLT program is an XML document itself An overview of XSLT, SAX, and DOM XSLT program XSLT processor Input XML Output XML Actually, output does not need to be in XML in general 21 22 XSLT program XSLT elements • An XSLT program is an XML document containing • Element describing transformation rules • Elements in the <xsl:> namespace • <xsl:template> • Elements in user namespace • Elements describing rule execution control • Roughly, result of evaluating an XSLT program on an input XML document = the XSLT document • <xsl:apply-templates> where each <xsl:> element is replaced with the • <xsl:call-template> result of its evaluation • Elements describing instructions • Basic ideas • <xsl:if>, <xsl:for-each>, <xsl:sort>, etc. • Templates specify how to transform matching • Elements generating output input nodes • <xsl:value-of> <xsl:copy-of> <xsl:element> • Structural recursion applies templates to , , , input trees recursively <xsl:attribute>, <xsl:text>, etc. • Uses XPath as a sub-language 23 24 XSLT example <xsl:template> • <xsl:template match="book[author='Abiteboul']"> Find titles of booKs authored by “Abiteboul” <booktitle> <xsl:value-of select="title"/> <?xml version="1.0"?> Standard header of an XSLT document </booktitle> <xsl:stylesheet </xsl:template> xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="book[author='Abiteboul']"> • <xsl:template match="match_expr"> is the basic XSLT <booktitle> construct describing a transformation rule <xsl:value-of select="title"/> </booktitle> • match_expr is an XPath-liKe expression specifying which </xsl:template> nodes this rule applies to </xsl:stylesheet> • <xsl:value-of select="xpath_expr"/> evaluates xpath_expr • Not quite; we will see why later within the context of the node matching the template, and converts the result sequence to a string • <booktitle> and </booktitle> simply get copied to the output for each node matched 4 4/12/17 25 26 Template in action Removing the extra output <xsl:template match="book[author='Abiteboul']"> <booktitle> • Add the following template: <xsl:value-of select="title"/> </booktitle> <xsl:template match="text()|@*"/> </xsl:template> • This template matches all text and attributes • Example XML fragment Template applies • XPath features <book ISBN="ISBN-10" price="80.00"> <title>Foundations of Databases</title> <booktitle> • text() is a node test that matches any text node <author>Abiteboul</author> Foundations of Databases <author>Hull</author> </booktitle> • @* <author>Vianu</author> matches any attribute <publisher>Addison Wesley</publisher> Template does not apply; • | <year>1995</year> means “or” in XPath <section>…</section>… default behavior is to process </book> the node recursively and
Recommended publications
  • Basex Server
    BaseX Documentation Version 7.8 BaseX Documentation: Version 7.8 Content is available under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0). Table of Contents 1. Main Page .............................................................................................................................. 1 Getting Started .................................................................................................................. 1 XQuery Portal .................................................................................................................... 1 Advanced User's Guide ..................................................................................................... 2 I. Getting Started ........................................................................................................................ 3 2. Command-Line Options ................................................................................................... 4 BaseX Standalone ..................................................................................................... 4 BaseX Server ............................................................................................................ 6 BaseX Client ............................................................................................................. 7 BaseX HTTP Server .................................................................................................. 9 BaseX GUI .............................................................................................................
    [Show full text]
  • Stylesheet Translations of SVG to VML
    Stylesheet Translations of SVG to VML A Master's Project presented to The Faculty of the Department of Computer Science San Jose State University In Partial Fulfillment of the Requirements for the Degree of Master of Science Julie Nabong Advisor: Dr. Chris Pollett May 2004 Abstract The most common graphics formats on the Web today are JPEG and GIF. In addition to these formats, two XML-based graphic types are available as open standards: SVG and VML. SVG and VML are vector graphic formats. These formats offer benefits such as fast Web download time, zoomable images, and searchable texts. Because these vector graphics are scalable, these images can be viewed in different screen sizes, such as PC displays and handheld devices. SVG and VML implementations are gaining popularity in Internet cartography and zoomable charts. SVG images can be viewed by downloading a plug-in; whereas, VML images are rendered in Microsoft's Internet Explorer browser versions 5.0 and higher. Although SVG may be considered a more mature format than VML, it is unlikely it will be supported natively by Microsoft anytime soon. In this master's project, SVG images will be transformed into VML images contained in an HTML document that can be viewed without a plug-in. SVG images will be manipulated through the Document Object Model API and transformed into VML images using JavaScript, XSLT, and XPath. JavaScript will play an important role in handling functionalities not present in XSLT. This project will address the issue of gradient discrepancies between the two formats, and try to get the speed of the translation as close to that of the plug-in based solution as possible.
    [Show full text]
  • XML: Looking at the Forest Instead of the Trees Guy Lapalme Professor Département D©Informatique Et De Recherche Opérationnelle Université De Montréal
    XML: Looking at the Forest Instead of the Trees Guy Lapalme Professor Département d©informatique et de recherche opérationnelle Université de Montréal C.P. 6128, Succ. Centre-Ville Montréal, Québec Canada H3C 3J7 [email protected] http://www.iro.umontreal.ca/~lapalme/ForestInsteadOfTheTrees/ Publication date April 14, 2019 XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/ XML: Looking at the Forest Instead of the Trees Guy Lapalme Professor Département d©informatique et de recherche opérationnelle Université de Montréal C.P. 6128, Succ. Centre-Ville Montréal, Québec Canada H3C 3J7 [email protected] http://www.iro.umontreal.ca/~lapalme/ForestInsteadOfTheTrees/ Publication date April 14, 2019 Abstract This tutorial gives a high-level overview of the main principles underlying some XML technologies: DTD, XML Schema, RELAX NG, Schematron, XPath, XSL stylesheets, Formatting Objects, DOM, SAX and StAX models of processing. They are presented from the point of view of the computer scientist, without the hype too often associated with them. We do not give a detailed description but we focus on the relations between the main ideas of XML and other computer language technologies. A single compact pretty-print example is used throughout the text to illustrate the processing of an XML structure with XML technologies or with Java programs. We also show how to create an XML document by programming in Java, in Ruby, in Python, in PHP, in E4X (Ecmascript for XML) and in Swift. The source code of the example XML ®les and the programs are available either at the companion web site of this document or by clicking on the ®le name within brackets at the start of the caption of each example.
    [Show full text]
  • Sinfonia: a New Paradigm for Building Scalable Distributed Systems
    Sinfonia: A New Paradigm for Building Scalable Distributed Systems Marcos K. Aguilera∗ Arif Merchant∗ Mehul Shah∗ Alistair Veitch∗ Christos Karamanolis† ∗HP Laboratories, Palo Alto, CA, USA †VMware, Palo Alto, CA, USA application application application application ABSTRACT node node node node We propose a new paradigm for building scalable distributed sys- tems. Our approach does not require dealing with message-passing protocols—a major complication in existing distributed systems. user minitransactions Instead, developers just design and manipulate data structures library within our service called Sinfonia. Sinfonia keeps data for appli- cations on a set of memory nodes, each exporting a linear address Sinfonia memory memory memory space. At the core of Sinfonia is a novel minitransaction primitive node node node that enables efficient and consistent access to data, while hiding the complexities that arise from concurrency and failures. Using Sinfo- Figure 1: Sinfonia allows application nodes to share data in a fault nia, we implemented two very different and complex applications tolerant, scalable, and consistent manner. in a few months: a cluster file system and a group communication service. Our implementations perform well and scale to hundreds of machines. We propose a new paradigm for building scalable distributed Categories and Subject Descriptors systems. With our scheme, developers do not have to deal with message-passing protocols. Instead, developers just design and ma- C.2.4 [Computer-Communication Networks]: Distributed sys- nipulate data structures within our service, called Sinfonia. We tems—Distributed applications; E.1 [Data Structures]: Dis- therefore transform the problem of protocol design into the much tributed data structures easier problem of data structure design.
    [Show full text]
  • Spreadsheet-Based Complex Data Transformation
    Spreadsheet-based complex data transformation Hung Thanh Vu Dissertation submitted in fulfilment of the requirements for the degree of Doctor of Philosophy School of Computer Science and Engineering University of New South Wales Sydney, NSW 2052, Australia March 2011 Supervisor: Prof. Boualem Benatallah i Acknowledgements I am very grateful to Professor Boualem for his exceptional unconditional support and limitless patience. He was the first person who taught me how to do research; how to write and present a complex research problem. He has always been there for me when I have any difficulties in research. He is one of the best supervisors I have ever worked with. Without his support, this thesis would never be completed. My sincere thanks go to Dr Regis Saint-Paul for his fruitful collaborations and providing me invaluable research skills. I also wish to express my gratitude to the members of the SOC group, who spent a lot of time discussing with me on the research issues and giving me helpful advice. I would like to thank Dr Paolo Papotti for insightful discussions on data exchange as well as mapping tools Clio, Clip, and +Spicy; Assisstant Professor Christopher Scaffidi for answering my questions on Topes; Associate Professor Wang-Chiew Tan and Dr Bogdan Alexe for helping me understand STBenchmark; Dr Wei Wang for helpful discussions on similarity join and its related algorithms; and some members of XQuery WG and XSLT WG including Daniela Florescu, Jerome Simeon, and Michael Kay for giving me advice on the expressiveness and new updates of XSLT and XQuery. Last but not least, I am forever in debt to my parents.
    [Show full text]
  • Declarative Access to Filesystem Data New Application Domains for XML Database Management Systems
    Declarative Access to Filesystem Data New application domains for XML database management systems Alexander Holupirek Dissertation zur Erlangung des akademischen Grades Doktor der Naturwissenschaften (Dr. rer. nat.) Fachbereich Informatik und Informationswissenschaft Mathematisch-Naturwissenschaftliche Sektion Universität Konstanz Referenten: Prof. Dr. Marc H. Scholl Prof. Dr. Marcel Waldvogel Tag der mündlichen Prüfung: 17. Juli 2012 Abstract XML and state-of-the-art XML database management systems (XML-DBMSs) can play a leading role in far more application domains as it is currently the case. Even in their basic configuration, they entail all components necessary to act as central systems for complex search and retrieval tasks. They provide language-specific index- ing of full-text documents and can store structured, semi-structured and binary data. Besides, they offer a great variety of standardized languages (XQuery, XSLT, XQuery Full Text, etc.) to develop applications inside a pure XML technology stack. Benefits are obvious: Data, logic, and presentation tiers can operate on a single data model, and no conversions have to be applied when switching in between. This thesis deals with the design and development of XML/XQuery driven informa- tion architectures that process formerly heterogeneous data sources in a standardized and uniform manner. Filesystems and their vast amounts of different file types are a prime example for such a heterogeneous dataspace. A new XML dialect, the Filesystem Markup Language (FSML), is introduced to construct a database view of the filesystem and its contents. FSML provides a uniform view on the filesystem’s contents and allows developers to leverage the complete XML technology stack on filesystem data.
    [Show full text]
  • Beginning XSLT for Humanists
    Beginning&XSLT&for&Humanists& April&18920,&2013& Beginning XSLT for Humanists SOUTHEASTERN LOUISIANA UNIVERSITY APRIL 18-20 http://idhmc.tamu.edu/xslt4u Introduction ! Matthew Christy ! [email protected] ! Lead Software Applications Developer ! Initiative for Digital Humanities, Media, and Culture (IDHMC) – Texas A&M University " We are available for help and consultations with XSLT work " XSLT workshops " Visualization Lab " Contact Director Laura Mandel ([email protected]) ! Class introductions ! Name & Department ! Current / planned projects SELU - Beginning XSLT - XSLT April 18-20, 2013 1& Beginning&XSLT&for&Humanists& April&18920,&2013& ! Day 1 ! HTML Outline ! CSS Day 1 ! Oxygen Editor Day 2 ! XML Day 3 SELU - Beginning XSLT - XSLT April 18-20, 2013 ! Day 2 ! XSLT • What is XSLT? Outline • Tree Structure • What is XSLT for? Day 1 • XPath Exercises • Versions • Flow Control Day 2 • XSLT is XML • Output Control • The Identity Day 3 • Whitespace Template • Variables & • Applying XSLT to Parameters XML • Sort • Basic Elements • Planning • Context • XSLT Exercises • XPath SELU - Beginning XSLT - XSLT April 18-20, 2013 2& Beginning&XSLT&for&Humanists& April&18920,&2013& ! Day 3 ! TEI Outline " What is TEI? Day 1 " What is TEI for? Day 2 " Versions " Reference Materials Day 3 " Structure " TEI Stylesheets " Modifying TEI Stylesheets " Exercises SELU - Beginning XSLT - XSLT April 18-20, 2013 Beginning XSLT for Humanists HTML HTML • What is HTML? • Markup • Versions • Flavors • The Good, the Bad, the Ugly SELU - Beginning XSLT - XSLT April 18-20, 2013 3& Beginning&XSLT&for&Humanists& April&18920,&2013& What is HTML? ! Hyper Text Markup Language " Hypertext: text displayed on a computer with references (hyperlinks) to that provide access to other texts.
    [Show full text]
  • Using Map and Reduce for Querying Distributed XML Data
    Using Map and Reduce for Querying Distributed XML Data Lukas Lewandowski Master Thesis in fulfillment of the requirements for the degree of Master of Science (M.Sc.) Submitted to the Department of Computer and Information Science at the University of Konstanz Reviewer: Prof. Dr. Marc H. Scholl Prof. Dr. Marcel Waldvogel Abstract Semi-structured information is often represented in the XML format. Although, a vast amount of appropriate databases exist that are responsible for efficiently storing semi- structured data, the vastly growing data demands larger sized databases. Even when the secondary storage is able to store the large amount of data, the execution time of complex queries increases significantly, if no suitable indexes are applicable. This situation is dramatic when short response times are an essential requirement, like in the most real-life database systems. Moreover, when storage limits are reached, the data has to be distributed to ensure availability of the complete data set. To meet this challenge this thesis presents two approaches to improve query evaluation on semi- structured and large data through parallelization. First, we analyze Hadoop and its MapReduce framework as candidate for our distributed computations and second, then we present an alternative implementation to cope with this requirements. We introduce three distribution algorithms usable for XML collections, which serve as base for our distribution to a cluster. Furthermore, we present a prototype implementation using a current open source database, named BaseX, which serves as base for our comprehensive query results. iii Acknowledgments I would like to thank my advisors Professor Marc H. Scholl and Professor Marcel Wald- vogel, who have supported me with advice and guidance throughout my master thesis.
    [Show full text]
  • Evolutionary Tree-Structured Storage: Concepts, Interfaces, and Applications
    Evolutionary Tree-Structured Storage: Concepts, Interfaces, and Applications Dissertation submitted for the degree of Doctor of Natural Sciences Presented by Marc Yves Maria Kramis at the Faculty of Sciences Department of Computer and Information Science Date of the oral examination: 22.04.2014 First supervisor: Prof. Dr. Marcel Waldvogel Second supervisor: Prof. Dr. Marc Scholl i Abstract Life is subdued to constant evolution. So is our data, be it in research, business or personal information management. From a natural, evolutionary perspective, our data evolves through a sequence of fine-granular modifications resulting in myriads of states, each describing our data at a given point in time. From a technical, anti- evolutionary perspective, mainly driven by technological and financial limitations, we treat the modifications as transient commands and only store the latest state of our data. It is surprising that the current approach is to ignore the natural evolution and to willfully forget about the sequence of modifications and therefore the past state. Sticking to this approach causes all kinds of confusion, complexity, and performance issues. Confusion, because we still somehow want to retrieve past state but are not sure how. Complexity, because we must repeatedly work around our own obsolete approaches. Performance issues, because confusion times complexity hurts. It is not surprising, however, that intelligence agencies notoriously try to collect, store, and analyze what the broad public willfully forgets. Significantly faster and cheaper random-access storage is the key driver for a paradigm shift towards remembering the sequence of modifications. We claim that (1) faster storage allows to efficiently and cleverly handle finer-granular modifi- cations and (2) that mandatory versioning elegantly exposes past state, radically simplifies the applications, and effectively lays a solid foundation for backing up, distributing and scaling of our data.
    [Show full text]
  • Chapter 7 XML.Pptx
    Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 [email protected] Chapter 7 - XML XML Origin and Usages n Defined by the WWW Consortium (W3C) n Originally intended as a document markup language, not a database language n Documents have tags giving extra information about sections of the document n For example: n <title> XML </title> n <slide> XML Origin and Usages </slide> n Meta-language: used to define arbitrary XML languages/vocabularies (e.g. XHTML) n Derived from SGML (Standard Generalized Markup Language) n standard for document description n enables document interchange in publishing, office, engineering, … n main idea: separate form from structure n XML is simpler to use than SGML n roughly 20% complexity achieves 80% functionality © Prof.Dr.-Ing. Stefan Deßloch XML Origin and Usages (cont.) n XML documents are to some extent self-describing n Tags represent metadata n Metadata and data are combined in the same document n semi-structured data modeling n Example <bank> <account> <account-number> A-101 </account-number> <branch-name> Downtown </branch-name> <balance> 500 </balance> </account> <depositor> <account-number> A-101 </account-number> <customer-name> Johnson </customer-name> </depositor> </bank> © Prof.Dr.-Ing. Stefan Deßloch Forces Driving XML n Document Processing n Goal: use document in various, evolving systems n structure – content – layout n grammar: markup vocabulary for mixed content n Data Bases and Data Exchange n Goal: data independence n structured, typed data – schema-driven – integrity constraints n Semi-structured Data and Information Integration n Goal: integrate autonomous data sources n data source schema not known in detail – schemata are dynamic n schema might be revealed through analysis only after data processing © Prof.Dr.-Ing.
    [Show full text]
  • Applying Representational State Transfer (REST) Architecture to Archetype-Based Electronic Health Record Systems
    Applying representational state transfer (REST) architecture to archetype-based electronic health record systems Erik Sundvall, Mikael Nyström, Daniel Karlsson, Martin Eneling, Rong Chen and Håkan Örman Linköping University Post Print N.B.: When citing this work, cite the original article. Original Publication: Erik Sundvall, Mikael Nyström, Daniel Karlsson, Martin Eneling, Rong Chen and Håkan Örman, Applying representational state transfer (REST) architecture to archetype-based electronic health record systems, 2013, BMC Medical Informatics and Decision Making, (13), 57. http://dx.doi.org/10.1186/1472-6947-13-57 Licensee: BioMed Central http://www.biomedcentral.com/ Postprint available at: Linköping University Electronic Press http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-87696 Sundvall et al. BMC Medical Informatics and Decision Making 2013, 13:57 http://www.biomedcentral.com/1472-6947/13/57 SOFTWARE Open Access Applying representational state transfer (REST) architecture to archetype-based electronic health record systems Erik Sundvall1*, Mikael Nyström1, Daniel Karlsson1, Martin Eneling1, Rong Chen1,2 and Håkan Örman1 Abstract Background: The openEHR project and the closely related ISO 13606 standard have defined structures supporting the content of Electronic Health Records (EHRs). However, there is not yet any finalized openEHR specification of a service interface to aid application developers in creating, accessing, and storing the EHR content. The aim of this paper is to explore how the Representational State Transfer (REST) architectural style can be used as a basis for a platform-independent, HTTP-based openEHR service interface. Associated benefits and tradeoffs of such a design are also explored. Results: The main contribution is the formalization of the openEHR storage, retrieval, and version-handling semantics and related services into an implementable HTTP-based service interface.
    [Show full text]
  • Sedna Programmer's Guide
    Sedna Programmer's Guide Contents 1 Client Application Programming Interfaces3 1.1 Java API..............................3 1.1.1 Sessions..........................3 1.1.2 Transactions Management................4 1.1.3 Statements........................5 1.1.4 Results...........................6 1.1.5 Exceptions.........................7 1.1.6 Code Example.......................7 1.2 C API............................... 10 1.2.1 Errors Handling...................... 11 1.2.2 Connecting to a Database................ 11 1.2.3 Setting Session Options................. 13 1.2.4 Transactions Management................ 16 1.2.5 Getting Connection and Transaction Status...... 18 1.2.6 Executing Queries and Updates............. 18 1.2.7 Loading Data....................... 21 1.2.8 Example Code....................... 23 1.3 Scheme API............................ 25 1.3.1 Sessions.......................... 26 1.3.2 Manage Transactions................... 26 1.3.3 Executing Queries and Updates............. 27 1.3.4 Bulk Load from Stream................. 29 1.3.5 Higher-level Function for a Transaction......... 29 1.3.6 Error handling...................... 29 1.3.7 Code Example....................... 30 2 Database Language 32 2.1 XQuery Support......................... 32 2.2 XQuery Options and Extensions................. 33 2.2.1 Controlling Serialization................. 33 1 2.2.2 Value index-scan Functions............... 33 2.2.3 Full-Text Search Functions................ 34 2.2.4 SQL Connection..................... 35 2.2.5 External Functions.................... 41 2.2.6 Runtime Properties.................... 45 2.3 Update Language......................... 45 2.4 Bulk Load............................. 49 2.4.1 CDATA section preserving................ 50 2.5 Data Definition Language.................... 51 2.5.1 Managing Standalone Documents............ 51 2.5.2 Managing Collections................... 51 2.5.3 Managing Value Indices................
    [Show full text]