Content area
Full Text
The beta of Microsoft's new technology gives you a glimpse into the future of datebase-application development
Microsoft's new Language Integrated Query (LINQ-pronounced link) project is the next step in database-development technology. LINQ addresses the current database-development model's disconnect between the object-oriented programming model and procedural, T-SQL-based data-access code. Today, database-application developers use an object-oriented language such as C# or Visual Basic.NET to develop applications. ADQNET serves as the object-oriented data-access middleware that connects the application with the database. However, even though the language and the data-access technology are all object oriented, developers still typically write data-access code in procedural T-SQL. For data access, ADO.NET provides an object-oriented wrapper around the T-SQL code that the developer writes. This development paradigm requires developers to know not only the object-oriented .NET language but also T-SQL, and it forces developers to use two technologies to develop applications. Although Visual Studio's IntelliSense and code-completion features can help developers write correct .NET code, the IDE provides no design help with the T-SQL part of the development. For example, the IDE can't show the available databases and doesn't prompt the developer for the available tables or columns. Further, the only time the IDE even knows whether the query has been built with the correct syntax is at runtime, when a syntax error generates an exception.
LINQ technology addresses this problem through a set of .NET language extensions that let database developers write database queries and updates in either Visual Basic (VB) or C# without requiring them to drop back to T-SQL to write their data-access code. LINQ lets query expressions benefit from the rich metadata, compile-time syntax checking, type checking, and IntelliSense that until now were available only to native .NET code. LINQ has two implementations: one for XML (XLinq) and the other for databases (DLinq). XLinq enhances the .NET language with Xpath and XQuery functionality, and DLinq enhances the host .NET language with SQL-like query-expression statements. In this article, I give you a preview of the new DLinq technology you'll see in the beta and show you some early DLinq code that can connect to SQL Server to query and update a SQL Server database.
The Blue Pill
In the movie "The Matrix," characters swallowed a blue pill that...