Anders Hejlsberg demos LINQ
While I was eating the pizza described here, I was being very impressed by the technology on display here. Anders Hejlsberg, Microsoft Distinguished Engineer and lead architect of C# (and, previously, Delphi) presents the current state of XLinq and DLinq to Jon Udell. LINQ is the headline feature for C# 3.0 (which is just a language and library update, not a runtime update); it stands for Language-INtegrated Query. XLinq is the implementation of LINQ for XML data and DLinq is the implementation for Database (SQL) data.
As you see towards the end of the lengthy (nearly an hour) video, you can mix them together. This means that you can write a query in C# that joins XML and SQL data. The LINQ engine will formulate a real SQL query to get the relational part of the data and send it off to the database for execution, then do the necessary joining and filtering with the XML part and return a set of strongly-typed objects. The amount of code required to do this is quite small, assuming you sweep the auto-generated object-relational mapping code under the rug.