•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 403,510 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 4,090 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 RSS, Web Services and SOAP advertiser: Programming Forums
Views: 8732 | Replies: 79
![]() |
•
•
Join Date: Oct 2007
Posts: 36
Reputation:
Rep Power: 1
Solved Threads: 0
XQuery is a new query language that supports navigational (or path-based) expressions. In fact, your applications can employ freely statements from both query languages, and a single query statement can actually incorporate both SQL and XQuery. The results of queries can return data in relational and XML formats, or a combination of both.
XQuery differs from SQL in a number of key respects, largely because the languages were designed to work with different data models that have different characteristics. XQuery supports path expressions to enable programmers to navigate through XML's hierarchical structure, while plain SQL (without XML extensions) does not. XQuery supports both typed and untyped data, while SQL data is always defined with a specific type. XQuery lacks null values because XML documents omit missing or unknown data. SQL, of course, 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 differs from SQL in a number of key respects, largely because the languages were designed to work with different data models that have different characteristics. XQuery supports path expressions to enable programmers to navigate through XML's hierarchical structure, while plain SQL (without XML extensions) does not. XQuery supports both typed and untyped data, while SQL data is always defined with a specific type. XQuery lacks null values because XML documents omit missing or unknown data. SQL, of course, uses nulls to represent missing or unknown data values. XQuery returns sequences of XML data; SQL returns result sets of various SQL data types.
•
•
Join Date: Oct 2007
Posts: 36
Reputation:
Rep Power: 1
Solved Threads: 0
We can query data in DB2 XML columns using SQL or SQL with XML extensions (SQL/XML). Unfortunately, there's a lot you can't do with just SQL. Plain SQL statements enable you to retrieve full XML documents, but you can't retrieve partial XML documents or specific element values from an XML document. You need to use SQL with XML extensions (SQL/XML), XQuery, or a combination of both to retrieve partial XML documents. Xquery can offer powerful capabilities for searching and integrating traditional SQL and XML data. DB2 also supports bilingual queries -- that is, queries that combine expressions from both SQL and XQuery. Which language (or combination of languages) you should use depends on the application needs. You can check http://www.ibm.com/developerworks/db...m-0604saracco/ for more information about querying XML data using Xquery.
•
•
Join Date: Oct 2007
Posts: 36
Reputation:
Rep Power: 1
Solved Threads: 0
XML data can be queried with SQL statements. But it is not possible to query specific element of the XML document using plain XML. Please check http://www.ibm.com/developerworks/db...-0603saracco2/ for more information about querying XML data with SQL.
•
•
Join Date: Oct 2007
Posts: 36
Reputation:
Rep Power: 1
Solved Threads: 0
XQuery with embedded SQL can be a good choice if you want to leverage relational predicates and indexes as well as full-text search to pre-filter the documents from an XML column which are then input to an XQuery. SQL embedded in XQuery also allows you to run external functions on the XML columns. But, if you need to perform data analysis queries with grouping and aggregations, you may prefer SQL/XML.
![]() |
•
•
•
•
•
•
•
•
DaniWeb RSS, Web Services and SOAP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
accounting software selection api apple asp bebo blogger blogging business software cd code development digital dom drama drm erp systems evaluations feed gdata google html ipod katemodern key linspire linux lonelygirl15 management microsoft mp3 news programming project management reader rights ripping rss soap software selection standards technology evaluation tv video w3c weather web xml xoap youtube zune
- Ezines (E-mail Management System) (eCommerce)
- Contract: Java, JSP, J2EE, XML & Fuego - USA (anywhere) (Web Development Job Offers)
- Windows XP and RAM Management (Windows NT / 2000 / XP / 2003)
- Senior Configuration Management/Build Engineer (Software Development Job Offers)
- Java XML Developer London WC1 (Web Development Job Offers)
- xml parser to validate xml files-Urgent (XML, XSLT and XPATH)
- How XML can be used in place of any database management system. (RSS, Web Services and SOAP)
- How are you making use of xml? (XML, XSLT and XPATH)
- over heating (Cases, Fans and Power Supplies)
- Processor (Windows NT / 2000 / XP / 2003)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: session variable
- Next Thread: XML Update??


Linear Mode