Skip to Main Content
SQL All-in-One For Dummies, 4th Edition
book

SQL All-in-One For Dummies, 4th Edition

by Allen G. Taylor, Richard Blum
April 2024
Intermediate to advanced content levelIntermediate to advanced
800 pages
18h 34m
English
For Dummies
Content preview from SQL All-in-One For Dummies, 4th Edition

Chapter 3

Retrieving Data from XML Documents

IN THIS CHAPTER

Bullet Discovering XQuery

Bullet Finding out about FLWOR expressions

Bullet Comparing XQuery with SQL

Early in the development of XML, one of the primary concerns was the conversion of data stored in SQL databases to XML so that it could be transmitted to other, incompatible data stores or so that it could be displayed on the web. In Book 6, Chapter 1, I describe several SQL functions whose purposes are to perform such conversions. Converting XML to SQL is also an important endeavor because SQL has traditionally been the premier tool for extracting the information you want from a collection of data. This conversion usually takes the form of shredding, in which an XML document is torn apart and pieces of it flow into the columns of tables in an SQL database. Then queries can be made by using normal SQL SELECT statements.

Querying XML documents directly, without shredding them into an SQL database, is much more complicated; thus, that capability took a while longer to implement in standard form. In addition, many common examples of XML documents aren’t readily shredded. The tree structure of an XML document can be difficult to translate into ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SQL All-In-One For Dummies, 3rd Edition

SQL All-In-One For Dummies, 3rd Edition

Allen G. Taylor
SQL Essentials For Dummies

SQL Essentials For Dummies

Richard Blum, Allen G. Taylor
SQL in a Nutshell, 4th Edition

SQL in a Nutshell, 4th Edition

Kevin Kline, Regina O. Obe, Leo S. Hsu

Publisher Resources

ISBN: 9781394242290Purchase Link