0% found this document useful (0 votes)
568 views

Query and Transformation in DBMS: Done by Ruban Christu Raj

Query transformation is a technique used by database optimizers to rewrite queries to optimize performance. It involves choosing, filtering, joining, and mapping data from multiple sources. Common query transformation tools for XML data include XPath for path expressions, XSLT for transformations, and XQuery, which combines features from earlier proposals and allows extracting, generating reports, transforming XML to other formats, and searching documents. Querying and transforming XML data stored in databases can be done using XQuery expressions, SQL statements, or a combination of both.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
568 views

Query and Transformation in DBMS: Done by Ruban Christu Raj

Query transformation is a technique used by database optimizers to rewrite queries to optimize performance. It involves choosing, filtering, joining, and mapping data from multiple sources. Common query transformation tools for XML data include XPath for path expressions, XSLT for transformations, and XQuery, which combines features from earlier proposals and allows extracting, generating reports, transforming XML to other formats, and searching documents. Querying and transforming XML data stored in databases can be done using XQuery expressions, SQL statements, or a combination of both.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Query And Transformation

in DBMS
Done by Ruban Christu raj
Query And Transformation

 Querying and transformation of XML data are essential to extract information from large
bodies of XML data, and to convert data between different representations (schemas) in
XML.

 A query can either be a request for data results from your database or for action on
the data, or for both.

 Data transformation is the process of converting data from one format, such as a
database file, XML document or Excel spreadsheet, into another.

 Query Transform is similar to a SQL SELECT statement. It can perform the following
operations- Choose (filter) the data to extract from sources. Join data from multiple
sources. Map columns from input to output schemas.
Query And Transformation in XML

 Extensible Markup Language (XML) is a markup language and file format for


storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for
encoding documents in a format that is both human-readable and machine-readable.

 Query transformation is an indispensable part of a performance-oriented database


system. With this problem solved, it is possible to adapt the physical database to the
query load and improve the performance of query processing.
What is Query transformation in DBMS ?

 Query transformation is a set of techniques used by the optimizer to rewrite a query


and optimizer it better. Few optimization paths open up to the optimizer after query
transformation

 You can use it as an input to another transform or write to multiple output
sources such as a database table or a flat file.
Query Transformation Tools

 Querying and transformation can be combined into a single tool. Following mentioned are some
tools/languages which provide facilities for transforming and querying XML data.

 Xpath:
XPath is a language for path expressions, and is actually a building block for the remaining two query
languages. A path expression in XPath is a sequence of location steps separated by “/” (instead of the “.”
operator that separates steps in SQL:1999).
/bank-2/customer/name
would return these elements:
<name>Joe</name>
<name>Lisa</name>
<name>Mary</name
XSLT:

 It was designed to be a transformation language, as part of the XSL style sheet system, which

is used to control the formatting of XML data into HTML or other print or display languages.

Although designed for formatting, XSLT can generate XML as output, and can express many

interesting queries. Furthermore, it is currently the most widely available language for

manipulating XML data.


XQuery:

 It has been proposed as a standard for querying of XML data. The World Wide Web
Consortium (W3C) is developing XQuery, a query language for XML. XQuery combines
features from many of the earlier proposals for querying XML, in particular the language
Quilt. Unlike XSLT, XQuery does not represent queries in XML. Instead, they appear more
like SQL queries, and are organized into “FLWR” (pronounced “flower”) expressions
comprising four sections: for, let, where, and return.
XQuery - Examples of Use

 XQuery can be used to:


• Extract information to use in a Web Service

• Generate summary reports

• Transform XML data to XHTML

• Search Web documents for relevant information


Retrieve process

 You can query or retrieve XML data stored in the database through two main query
languages, either by using each language on its own or by using a combination of the two.

• XQuery expressions that invoke SQL statements

• SQL statements only

• SQL statements that executes XQuery expressions

 These various methods allow you to query or retrieve XML and other relational data from
either an SQL or XQuery context.
Thank you

You might also like