XML, XML Databases and MPEG-7


Published on

XML, XML Databases and MPEG-7

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

XML, XML Databases and MPEG-7

  1. 1. XML , XML Databases and M P EG-7 Deniz KILINÇ [email_address]
  2. 2. Content <ul><li>What is XML? </li></ul><ul><li>XML and Related Technologies </li></ul><ul><li>What is MPEG-7? </li></ul><ul><li>XML Storage Using Databases </li></ul><ul><li>What is a n NXD (Native XML Database)? </li></ul><ul><li>MPEG-7 and XML Relation’s Future </li></ul>
  3. 3. What is XML? <XML>
  4. 4. What is XML? <ul><li>Developed by W3C (World Wide Web Consortium) </li></ul><ul><li>Universal format for representing structured information </li></ul><ul><li>It holds both data and metadata which is data about data </li></ul><ul><li>With the assistance of XSL, XSLT, XPath and XLink technologies, filtering, ordering, calculation and integration processes must be fulfilled </li></ul><ul><li>Since XML technology supports internet and network technology, HTTP and SSL protocols are spontaneously supported </li></ul>
  5. 5. What is XML? <ul><li>Learning, reading, implementing and testing the XML technology is really easy. </li></ul><ul><li>It shortens the application development time like B2B. </li></ul><ul><li>Although XML is a simple document format, it is used in complex application scenarios like RPC messaging. </li></ul><ul><li>XML processing and traversing tools are world-wide and very cheap. </li></ul><ul><li>With the development of DOM which is a tree based processing tool, document traversing ha e become a world standard. </li></ul>
  6. 6. XML Real Life Scenarios <ul><li>Using XML documents as data sources </li></ul><ul><ul><li>Processing documents using DOM model </li></ul></ul><ul><ul><li>Processing and presentation using XSL, XSLT and XPath technologies </li></ul></ul><ul><li>Using XML documents in the integration of different systems </li></ul><ul><ul><li>B2B applications </li></ul></ul><ul><ul><ul><li>XMLRPC, XMLHTTP </li></ul></ul></ul><ul><ul><li>Web Ser ices </li></ul></ul><ul><ul><ul><li>SOAP </li></ul></ul></ul><ul><ul><li>BizTalk </li></ul></ul><ul><li>Using XML documents to standardize GUI (Graphical User Interface) </li></ul><ul><ul><li>UIML (User Interface Markup Language) (WEB_20, 2004) </li></ul></ul><ul><ul><li>XAML (XML Application Markup Language) (WEB_19, 2004) </li></ul></ul><ul><li>Using XML data as ActiveX component’s content </li></ul><ul><li>Using XML technology in different application areas (MPEG-7, WML, </li></ul><ul><li>RDF, CML, MathML , VoiceXML , TV-AnyTime , XHTML …) </li></ul>
  7. 7. XML and Related Technologies <ul><li>XML Schema </li></ul><ul><ul><li>Structure definition and d ocument validation </li></ul></ul><ul><li>XSL </li></ul><ul><ul><li>Transformation - conversion from one document class to another </li></ul></ul><ul><li>XPath </li></ul><ul><ul><li>Extraction of information </li></ul></ul><ul><li>XLink </li></ul><ul><ul><li>Linking between documents </li></ul></ul><ul><li>XQuery </li></ul><ul><ul><li>Querying </li></ul></ul>
  8. 8. XML and Related Technologies <XSL> XSLT language pro v ides XML documents to be transformed
  9. 9. XML and Related Technologies <XPath> <ul><li>Purpose: Support addressing parts of an XML document </li></ul><ul><li>D esigned to be used by both XSLT and XPointer </li></ul><ul><li>Uses a compact, non-XML syntax to facilitate use within URIs & XML attribute values </li></ul>/doc/chapter[title=&quot;Introduction&quot;]/section[1] selects the first section of the chapter titled “ Introduction” in the doc document element
  10. 10. <?xml v ersion=&quot;1.0&quot; encoding=&quot;iso-8859-9&quot;?> <?xml-stylesheet type=&quot;text/xsl&quot; href=&quot;HelloXS L .xsl&quot;?> <ROOT> <Content>First XSL Sample</Content> </ROOT> <xsl:stylesheet xmlns:xsl= “ http://www.w3.org/1999/XSL/Transform ” v ersion=&quot;1.0&quot;> <xsl:output method=&quot;html&quot;/> <xsl:template match=&quot;/&quot; > <HTML><BODY><table border=&quot;1&quot;> <tr><td bgcolor=&quot;si lv er&quot;> /ROOT/Content Query Result</td> <td bgcolor=&quot;sil v er&quot;> <font color=&quot;red&quot;><B> <xsl:value-of select=&quot;/ROOT/Content&quot; /></B> </font> < /td></tr> </table></BODY></HTML> </xsl:template> </xsl:stylesheet>
  11. 11. XSLT Output
  12. 12. What is MPEG-7 ? <ul><li>MPEG-7, formally called “Multimedia Content Description Interface”, is a new standard for describing the content of multimedia data . </li></ul><ul><li>MPEG-7 is a means of attaching metadata to multimedia content. </li></ul><ul><li>Metadata can be stored together or separately with the multimedia data </li></ul><ul><li>Metada is kept as an XML file </li></ul>
  13. 13. What is MPEG-7 ? <ul><li>MPEG-7 descriptions associated with it, may include: still pictures, graphics, 3D models, audio, speech, video, and composition information about how these elements are combined in a multimedia presentation (scenarios). </li></ul>
  14. 14. MPEG-7 Main Elements <ul><li>Description Tools </li></ul><ul><ul><li>Descriptors (D) </li></ul></ul><ul><ul><li>Description Schemes (DS) </li></ul></ul><ul><li>Description Definition Language (DDL) </li></ul><ul><li>System Tools </li></ul>
  15. 15. MPEG-7 Main Elements 1- Descriptor (D) <ul><li>Is representation of a feature where a future is distinctive characteristic of data </li></ul><ul><li>Define the syntax and the semantics of each feature (metadata element) </li></ul><ul><li>Examples ; </li></ul><ul><ul><li>a time code for representing duration </li></ul></ul><ul><ul><li>color moments and histogram for representing color </li></ul></ul><ul><ul><li>character string representing title </li></ul></ul>
  16. 16. MPEG-7 Main Elements 2- Descript ion Scheme (DS) <ul><li>Specifies the structure and semantics of the relationships between their components, that may be both Descriptors and Description Schemes </li></ul><ul><li>Provides a solution to model and describe multimedia content in terms of structure and semantics </li></ul><ul><li>Example; </li></ul><ul><ul><li>A movie that temporally structured as scenes and shots, including some textual descriptors at scene level and color, motion and audio amplitude descriptors at the shot level. </li></ul></ul>
  17. 17. MPEG-7 Main Elements 3- Description Definition Language (DDL) <ul><li>D efine s the syntax of the MPEG-7 Description Tools and to allow the creation of new Description Schemes and, possibly, Descriptors </li></ul><ul><li>A llow s the extension and modification of existing Description Schemes </li></ul>
  18. 18. MPEG-7 Main Elements 4- System Tools <ul><li>T o support binary coded representation for efficient storage and transmission, transmission mechanisms (both for textual and binary formats), multiplexing of descriptions, synchronization of descriptions with content, management and protection of intellectual property in MPEG-7 descriptions </li></ul>
  19. 19. MPEG-7 Main Elements
  20. 20. MPEG-7 Applications <ul><li>MPEG-7 standard organizes the example applications into three sets ; </li></ul><ul><ul><li>Pull applications </li></ul></ul><ul><ul><ul><li>Applications such as storage and retrieval in audiovisual databases, delivery of pictures and video for professional media production, commercial musical applications, sound effects libraries, historical speech database, movie scene retrieval by memorable auditory events, and registration and retrieval of trademarks. </li></ul></ul></ul><ul><ul><li>Push applications </li></ul></ul><ul><ul><ul><li>Applications such as user agent driven media selection and filtering, personalized television services, intelligent multimedia presentations, and information access facilities for people with special needs. </li></ul></ul></ul><ul><ul><li>Specialized professional applications </li></ul></ul><ul><ul><ul><li>Applications that are particularly related to a specific professional environment, notably tele-shopping, bio-medical, remote sensing, educational, and surveillance applications. </li></ul></ul></ul>
  21. 21. Abstract Representation Of Possible Applications Using MPEG-7 <XML> <XML> <XML> <XML>
  22. 22. XML Storage Using Databases <ul><li>There are two different ways to &quot;store&quot; XML documents in a database </li></ul><ul><ul><li>XML-enabled databases, map the document's schema to a database schema and transfer data according to that mapping. have their own data model — relational, hierarchical, object-oriented — and map instances of the XML data model to instances of their data model. </li></ul></ul><ul><ul><li>Native XML databases use a fixed set of structures that can store any XML document and use the XML data model directly . </li></ul></ul>
  23. 23. What is a n NXD (Native XML Database)? <ul><li>The database is specialized for storing XML data and stores all components of the XML model intact </li></ul><ul><li>XML databases store XML documents as a set in a container or collection which will be called a “collection” </li></ul><ul><li>A document within a container has a unique name or document identifier (id) </li></ul><ul><li>Must have “round-tripping” capability; </li></ul><ul><ul><li>getting the same XML out of a system you put in </li></ul></ul>
  24. 24. What is a n NXD (Native XML Database)? <ul><li>NXD features ; </li></ul><ul><ul><li>Storage </li></ul></ul><ul><ul><li>Document Collections </li></ul></ul><ul><ul><li>Querying </li></ul></ul><ul><ul><li>Indexing </li></ul></ul><ul><ul><li>Updates and Deletes </li></ul></ul><ul><ul><li>Transactions, Locking, and Concurrency </li></ul></ul><ul><ul><li>Application Programming Interfaces (APIs) </li></ul></ul>
  25. 25. Storage <ul><li>There are two major choices in terms of how to store a document </li></ul><ul><ul><li>Intact </li></ul></ul><ul><ul><li>Not Intact </li></ul></ul>
  26. 26. Storage Intact NXD <ul><li>Advantage </li></ul><ul><ul><ul><li>Systems that store XML documents intact will gener- </li></ul></ul></ul><ul><ul><ul><li>ally parse the XML in order to ensure it is well formed, </li></ul></ul></ul><ul><ul><ul><li>or for validation but otherwise store the documents </li></ul></ul></ul><ul><ul><ul><li>unchanged. This is useful for applications that require </li></ul></ul></ul><ul><ul><ul><li>100%round-tripping capability (in terms of byte compar- </li></ul></ul></ul><ul><ul><ul><li>isons) which is difficult to attain any other way. </li></ul></ul></ul><ul><li>Disadvantage </li></ul><ul><ul><ul><li>For certain applications and queries , it can take a </li></ul></ul></ul><ul><ul><ul><li>long time and a large amount of memory to process a </li></ul></ul></ul><ul><ul><ul><li>request, T his is mostly due to the need to parse docu- </li></ul></ul></ul><ul><ul><ul><li>ments to satisfy a query. </li></ul></ul></ul>
  27. 27. Document Collections <ul><li>Many native XML databases support the notion of a collection. This plays a role similar to a table in a relational database or a directory in a file system. </li></ul><ul><li>For example, suppose you are using a native XML database to store sales orders. In this case, you might want to define a sales order collection so that queries over sales orders could be limited to documents in that collection. </li></ul>
  28. 28. Querying <ul><li>XML documents can be queried using </li></ul><ul><ul><li>An XPath expression </li></ul></ul><ul><ul><li>Using XQuery 1.0 </li></ul></ul><ul><li>The results may be XML documents, DOM, SAX or a proprietary form. </li></ul><ul><li>In order to function as a database query language, XPath and XQuery are extended slightly to allow queries across collections of documents. </li></ul>
  29. 29. Indexing <ul><li>Four types of indexing; </li></ul><ul><ul><li>Structural Indexes </li></ul></ul><ul><ul><li>Value Indexes </li></ul></ul><ul><ul><li>Full-text indexes </li></ul></ul>
  30. 30. Indexing Structural Indexes <ul><li>Used for tracking structure and path information such as “track existence of all element nodes with the path,‘/a/b/c ’,”or “track all paths to the node ‘c ’.” </li></ul><ul><li>Such indexes are useful for navigational portions of queries. </li></ul><ul><li>That is often indexes are used to restrict the result set to a smaller set of possible results. </li></ul>
  31. 31. Indexing Value Indexes <ul><li>Value indexes are used to track all values for specific elements or attributes. A value index on the element “color” would have an index entry for every separate instance of “color” and would be useful for a query such as “//color [=’green ’]” </li></ul><ul><li>Value indexes may be typed so that comparisons can be performed correctly. For example , the value of this element <nameid >1234 </nameid > could be an integer or it could be a string. The type of an index dictates how it is handled. </li></ul>
  32. 32. Indexing Full-text Indexes <ul><li>Full-text indexes and searching as people expect on the web is its own discipline. There is a working draft for full-text extensions to XQuery [XQueryFT ] ;it is not in general use. </li></ul><ul><li>Some native XML database products implement what they call full-text indexing. </li></ul><ul><li>For example, “find all of the documents that have the text ‘ to be or not to be ’” </li></ul>
  33. 33. Updates and Deletes <ul><li>Native XML databases have a variety of strategies for updating and deleting documents, from simply replacing or deleting the existing document to modifications through a live DOM tree to languages that specify how to modify fragments of a document. </li></ul><ul><li>XUpdate , from the XML:DB Initiative, is an XML-based language. It uses XPath to identify a set of nodes, then specifies whether to insert or delete these nodes, or insert new nodes before or after them. XUpdate has been implemented in a number of native XML databases. </li></ul>
  34. 34. Transactions, Locking, and Concurrency <ul><li>Virtually all native XML databases support transactions (and presumably support rollbacks). </li></ul><ul><li>However, locking is often at the level of entire documents, rather than at the level of individual nodes, so multi-user concurrency can be relatively low. </li></ul><ul><li>The problem with node-level locking is implementing it. Locking a node usually requires locking its parent, which in turn requires locking its parent, and so on back to the root, effectively locking the entire document. </li></ul>
  35. 35. Transactions, Locking, and Concurrency <ul><li>Consider a transaction that reads a leaf node. If the transaction does not acquire locks on the ancestors of the leaf node, another transaction can delete an ancestor of the leaf node, in turn deleting the leaf node. </li></ul><ul><li>However, it is also clear that another transaction should be able to update those parts of the document not on the direct path from the root to the leaf node. </li></ul>
  36. 36. Application Programming Interfaces (APIs) <ul><li>Almost all native XML databases offer programmatic APIs. These are usually in the form of an ODBC-like interface, with methods for connecting to the database, exploring metadata, executing queries, and retrieving results. </li></ul><ul><li>Results are usually returned as an XML string, a DOM tree, or a SAX Parser or XMLReader over the returned document. </li></ul>
  37. 37. NeoCore NXD <ul><li>Supported Features </li></ul><ul><ul><li>Indexing </li></ul></ul><ul><ul><li>Querying, XQuery 1.0 </li></ul></ul><ul><ul><li>Full text search </li></ul></ul><ul><ul><li>Update, Delete </li></ul></ul><ul><ul><li>Transaction Support </li></ul></ul><ul><ul><li>API (XMSDataAdapter) </li></ul></ul><ul><ul><li>HTTP GET/POST </li></ul></ul>