XML QUERY LANGUAGES: XQUERY AND XPATH Quantified

XML QUERY LANGUAGES: XQUERY AND XPATH Quantified expressions Where one element satisfies a condition Expressions involving types Cast, instance of, treat, and typeswitch Finally, let s explore the question of what type of data models (XML can represent many different data models) should XQuery be used on? Some authors have attempted to make a distinction between XQuery and XSLT based on the premise that although XSLT and XQuery can be used for almost all the same functions (at least if you compare XSLT 2.0 and XQuery 1.0), XSLT with its template mechanism is better for data-driven transformations, while XQuery is better suited for queries. We find it instructive to look at the XQuery use cases document to see what the inventors of XQuery had in mind. The use cases mention many different kinds of data. Experiences and exemplars General XML Tree Queries that preserve hierarchy Sequence Queries based on document ordering Relational Relational data (representing tables as XML documents) SGML Queries against SGML data String String search (a.k.a. full-text search) Queries using namespaces Parts explosion Object and Codasyl databases usually do this well Strong types Queries that exploit strongly typed data Full-text use cases (separate specification) So it appears that XQuery can be useful with all kinds of data; however, particular implementations may not implement certain features that their data types cannot take advantage of. We ll see this point when we look at the XQuery implementation inside SQL Server. Comparing and Contrasting XQuery and SQL SQL (specifically, Transact-SQL) is the native language of SQL Server. SQL Server programmers have used it exclusively, until the CLR language becomes available in SQL Server 2005. These same programmers are probably not familiar with XQuery, an XML-centric query language that is still a work in progress, and it is instructive to compare the two languages to make SQL programmers more at home.

Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost Java Web Hosting services

Bookmark the permalink.

Comments are closed.