User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 455,972 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,808 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 4617 | Replies: 32
Reply
Join Date: Oct 2007
Posts: 31
Reputation: ssahil11 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ssahil11 ssahil11 is offline Offline
Light Poster

Xquery in DB2

  #1  
Nov 22nd, 2007
I have recently started working with DB2 database. I have heard about Xquery. What exactly Xquery is?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: Xquery in DB2

  #2  
Nov 23rd, 2007
XQuery is a new query language designed specifically to work with XML data. Xquery is a part of the W3C industry standard. It lets users navigate through the hierarchical structure inherent in XML documents. As a result, you can retrieve XML documents or document fragments using XQuery. You can also write XQuery that include XML-based predicates to "filter out" unwanted data from the results that DB2 will return.
Reply With Quote  
Join Date: Oct 2007
Posts: 31
Reputation: ssahil11 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ssahil11 ssahil11 is offline Offline
Light Poster

Re: Xquery in DB2

  #3  
Nov 25th, 2007
I have heard that XQuery is similar to SQL. Is it true?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: Xquery in DB2

  #4  
Nov 26th, 2007
Many SQL users mistakenly assume that XQuery is very similar to SQL. However,
XQuery differs from SQL in many ways largely because the languages were designed to work with different data models that have different characteristics. XML documents contain hierarchies and possess an inherent order. By contrast, tables supported by relational DBMSs (or, more precisely, SQL-based DBMSs) are flat and set-based, so rows are unordered.
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: Xquery in DB2

  #5  
Nov 28th, 2007
Also, XQuery lacks null values because XML documents omit missing or unknown data. SQL uses nulls to represent missing or unknown data values. XQuery returns sequences of XML data; SQL returns result sets of various SQL data types.
XQuery operates only on XML data. SQL operates on columns defined on traditional
SQL types and SQL/XML (SQL with XML extensions) operates on both XML data and traditional types of SQL data.
Reply With Quote  
Join Date: Oct 2007
Posts: 31
Reputation: ssahil11 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ssahil11 ssahil11 is offline Offline
Light Poster

Re: Xquery in DB2

  #6  
Nov 28th, 2007
What is Path Expression in Xquery?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: Xquery in DB2

  #7  
Nov 30th, 2007
XQuery supports XPath expressions that allow users to navigate through an XML document hierarchy to locate portions of interest. XPath expressions look very much like the expressions you use when working with a traditional computer file system. A path expression in XQuery consists of a series of "steps" separated by slash characters. In its simplest form, each step navigates downward in an XML hierarchy to find the children of the elements returned by the previous step. Each step in a path expression may also contain a predicate that filters the elements that are returned by that step, retaining only elements that satisfy some condition. You can check http://www.ibm.com/developerworks/db...m-0604saracco/ to learn basic XQuery expressions for querying DB2 XML data XQuery.
Reply With Quote  
Join Date: Oct 2007
Posts: 31
Reputation: ssahil11 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ssahil11 ssahil11 is offline Offline
Light Poster

Re: Xquery in DB2

  #8  
Dec 2nd, 2007
And what is FLWOR Expression?
Reply With Quote  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: Xquery in DB2

  #9  
Dec 3rd, 2007
FLWOR Expression is much like a SELECT-FROM-WHERE expression in SQL. It is used to iterate through a sequence of items and to optionally return something that is computed from each item. XQuery FLWOR expression may contain multiple clauses denoted by keywords. The clauses of a FLWOR expression begin with the following keywords:
• for: Iterates through an input sequence, binding a variable to each input item in turn
• let: Declares a variable and assigns it a value, which may be a list containing multiple items
• where: Specifies criteria for filtering query results
• order by: Specifies the sort order of the result
• return: Defines the result to be returned
Reply With Quote  
Join Date: Sep 2007
Posts: 19
Reputation: s.piyush58 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
s.piyush58 s.piyush58 is offline Offline
Newbie Poster

Re: Xquery in DB2

  #10  
Dec 10th, 2007
Can someone tell more about DB2 support for Xquery?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb XML, XSLT and XPATH Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the XML, XSLT and XPATH Forum

All times are GMT -4. The time now is 9:13 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC