Upload
deniz-kilinc
View
1.770
Download
4
Embed Size (px)
DESCRIPTION
XML, XML Databases and MPEG-7
Citation preview
2
Content
What is XML? XML and Related Technologies What is MPEG-7? XML Storage Using Databases What is an NXD (Native XML Database)? MPEG-7 and XML Relation’s Future
3
What is XML?
4
What is XML?
Developed by W3C (World Wide Web Consortium) Universal format for representing structured information It holds both data and metadata which is data about
data With the assistance of XSL, XSLT, XPath and XLink
technologies, filtering, ordering, calculation and integration processes must be fulfilled
Since XML technology supports internet and network technology, HTTP and SSL protocols are spontaneously supported
5
What is XML? Learning, reading, implementing and testing the XML
technology is really easy. It shortens the application development time like B2B. Although XML is a simple document format, it is used
in complex application scenarios like RPC messaging.
XML processing and traversing tools are world-wide and very cheap.
With the development of DOM which is a tree based processing tool, document traversing ha e become a world standard.
6
XML Real Life Scenarios Using XML documents as data sources
Processing documents using DOM model Processing and presentation using XSL, XSLT and XPath
technologies Using XML documents in the integration of different systems
B2B applications XMLRPC, XMLHTTP
Web Ser ices SOAP
BizTalk Using XML documents to standardize GUI (Graphical User Interface)
UIML (User Interface Markup Language) (WEB_20, 2004) XAML (XML Application Markup Language) (WEB_19, 2004)
Using XML data as ActiveX component’s content Using XML technology in different application areas (MPEG-7, WML, RDF, CML, MathML, VoiceXML, TV-AnyTime, XHTML …)
7
XML and Related Technologies
XML Schema Structure definition and document validation
XSL Transformation - conversion from one document class to
another XPath
Extraction of information XLink
Linking between documents XQuery
Querying
8
XML and Related Technologies<XSL>
XSLT language provides XML documents to be transformed
9
XML and Related Technologies<XPath>
Purpose: Support addressing parts of an XML document Designed to be used by both XSLT and XPointer Uses a compact, non-XML syntax to facilitate use within
URIs & XML attribute values
/doc/chapter[title="Introduction"]/section[1]
selects the first section of the chapter titled
“Introduction” in the doc document element
10
<?xml version="1.0" encoding="iso-8859-9"?>
<?xml-stylesheet type="text/xsl" href="HelloXSL.xsl"?>
<ROOT> <Content>First XSL Sample</Content>
</ROOT>
<xsl:stylesheet xmlns:xsl=“http://www.w3.org/1999/XSL/Transform” version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<HTML><BODY><table border="1">
<tr><td bgcolor="silver">
/ROOT/Content Query Result</td>
<td bgcolor="silver">
<font color="red"><B> <xsl:value-of select="/ROOT/Content"/></B>
</font></td></tr>
</table></BODY></HTML>
</xsl:template>
</xsl:stylesheet>
11
XSLT Output
12
What is MPEG-7?
MPEG-7, formally called “Multimedia Content Description Interface”, is a new standard for describing the content of multimedia data.
MPEG-7 is a means of attaching metadata to multimedia content.
Metadata can be stored together or separately with the multimedia data
Metada is kept as an XML file
13
What is MPEG-7?
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).
14
MPEG-7 Main Elements
1. Description Tools Descriptors (D) Description Schemes (DS)
2. Description Definition Language (DDL)
3. System Tools
15
MPEG-7 Main Elements1-Descriptor (D)
Is representation of a feature where a future is distinctive characteristic of data
Define the syntax and the semantics of each feature (metadata element)
Examples; a time code for representing duration color moments and histogram for representing color character string representing title
16
MPEG-7 Main Elements2-Description Scheme (DS)
Specifies the structure and semantics of the relationships between their components, that may be both Descriptors and Description Schemes
Provides a solution to model and describe multimedia content in terms of structure and semantics
Example; 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.
17
MPEG-7 Main Elements3- Description Definition Language (DDL)
Defines the syntax of the MPEG-7 Description Tools and to allow the creation of new Description Schemes and, possibly, Descriptors
Allows the extension and modification of existing Description Schemes
18
MPEG-7 Main Elements4- System Tools
To 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
19
MPEG-7 Main Elements
20
MPEG-7 Applications MPEG-7 standard organizes the example applications
into three sets; Pull applications
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.
Push applications 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.
Specialized professional applications Applications that are particularly related to a specific professional
environment, notably tele-shopping, bio-medical, remote sensing, educational, and surveillance applications.
21
Abstract Representation Of Possible
Applications Using MPEG-7
22
XML Storage Using Databases
There are two different ways to "store" XML documents in a database 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.
Native XML databases use a fixed set of structures that can store any XML document and use the XML data model directly .
23
What is an NXD (Native XML Database)?
The database is specialized for storing XML data and stores all components of the XML model intact
XML databases store XML documents as a set in a container or collection which will be called a “collection”
A document within a container has a unique name or document identifier (id)
Must have “round-tripping” capability; getting the same XML out of a system you put in
24
What is an NXD (Native XML Database)?
NXD features; Storage Document Collections Querying Indexing Updates and Deletes Transactions, Locking, and Concurrency Application Programming Interfaces (APIs)
25
Storage
There are two major choices in terms of how to store a document Intact Not Intact
26
StorageIntact NXD Advantage
Systems that store XML documents intact will gener-ally parse the XML in order to ensure it is well formed,or for validation but otherwise store the documentsunchanged. This is useful for applications that require100%round-tripping capability (in terms of byte compar-isons) which is difficult to attain any other way.
DisadvantageFor certain applications and queries, it can take along time and a large amount of memory to process arequest, This is mostly due to the need to parse docu-ments to satisfy a query.
27
Document Collections
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.
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.
28
Querying
XML documents can be queried using An XPath expression Using XQuery 1.0
The results may be XML documents, DOM, SAX or a proprietary form.
In order to function as a database query language, XPath and XQuery are extended slightly to allow queries across collections of documents.
29
Indexing
Four types of indexing; Structural Indexes Value Indexes Full-text indexes
30
IndexingStructural Indexes
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 ’.”
Such indexes are useful for navigational portions of queries.
That is often indexes are used to restrict the result set to a smaller set of possible results.
31
IndexingValue Indexes
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 ’]”
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.
32
IndexingFull-text Indexes
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.
Some native XML database products implement what they call full-text indexing.
For example, “find all of the documents that have the text ‘to be or not to be’”
33
Updates and Deletes
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.
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.
34
Transactions, Locking, and Concurrency
Virtually all native XML databases support transactions (and presumably support rollbacks).
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.
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.
35
Transactions, Locking, and Concurrency
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.
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.
36
Application Programming Interfaces (APIs)
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.
Results are usually returned as an XML string, a DOM tree, or a SAX Parser or XMLReader over the returned document.
37
NeoCore NXD
Supported Features Indexing Querying, XQuery 1.0 Full text search Update, Delete Transaction Support API (XMSDataAdapter) HTTP GET/POST