Feeds

Mind your languages with Microsoft LINQ

Data-access sticking plaster?

Intelligent flash storage arrays

We've been hearing a growing amount this year about LINQ - Microsoft's Language Integrated Query. You can expect a lot more next year, starting in February as Microsoft launches Visual Studio 2008 and SQL Server 2008. LINQ promises to close the skills and knowledge gap for developers using C# and VisualBasic trying to connect to different data types and sources.

Before Visual Studio and SQL Server 2008 hit, here's what you as a programmer need to know about LINQ.

LINQ was created as the solution to a communication problem. Most modern programming languages are Object-Oriented (OO) while much of the world's data is stored in relational databases. Application programmers are used to dealing with things such as objects, classes and methods but they are not usually familiar with SQL - the language used to query relational databases.

As Anders Hejlsberg - the noted language expert and designer of Microsoft's C# - has argued, this has created: "An impedance mismatch today between general-purpose programming languages and databases. LINQ adds native query capability into programming languages such as C# and VisualBasic."

At a very simplistic level, LINQ can be seen as an OO querying language that can be understood and used by OO programmers and yet run against relational structures. But whilst this describes the way that it will often be used, LINQ actually does a lot more and is described by Hejlsberg and colleague Don Box here as: "General-purpose query facilities added to the .NET Framework [that] apply to all sources of information, not just relational or XML data."

So LINQ allows application programmers of an OO mindset to query any data source (Relational, OO and XML) in a way that they find intuitively easier. It is not, despite what some people have written, a replacement for SQL. To be explicitly clear about this, whilst DBAs are, of course, free to use LINQ if they so wish, there is no suggestion that it will become their language of choice.

For programmers, one of the best resources I've found for getting one's brain around LINQ is the intriguingly labeled 101 LINQ Samples for Visual C# that can be found here. Intriguing, why? Because there are actually 99 samples. Oh, those Microsoft clowns.

So does LINQ open the door to a pain-free world? I never said that. Most people would agree that there is an "impedance mismatch" between general-purpose programming languages and databases. We can, though, essentially address this problem from either end.

Choosing a cloud hosting partner with confidence

More from The Register

next story
Be real, Apple: In-app goodie grab games AREN'T FREE – EU
Cupertino stands down after Euro legal threats
Download alert: Nearly ALL top 100 Android, iOS paid apps hacked
Attack of the Clones? Yeah, but much, much scarier – report
Microsoft: Your Linux Docker containers are now OURS to command
New tool lets admins wrangle Linux apps from Windows
Bada-Bing! Mozilla flips Firefox to YAHOO! for search
Microsoft system will be the default for browser in US until 2020
Facebook, working on Facebook at Work, works on Facebook. At Work
You don't want your cat or drunk pics at the office
Soz, web devs: Google snatches its Wallet off the table
Killing off web service in 3 months... but app-happy bonkers are fine
prev story

Whitepapers

Why cloud backup?
Combining the latest advancements in disk-based backup with secure, integrated, cloud technologies offer organizations fast and assured recovery of their critical enterprise data.
Forging a new future with identity relationship management
Learn about ForgeRock's next generation IRM platform and how it is designed to empower CEOS's and enterprises to engage with consumers.
How to determine if cloud backup is right for your servers
Two key factors, technical feasibility and TCO economics, that backup and IT operations managers should consider when assessing cloud backup.
High Performance for All
While HPC is not new, it has traditionally been seen as a specialist area – is it now geared up to meet more mainstream requirements?
Security and trust: The backbone of doing business over the internet
Explores the current state of website security and the contributions Symantec is making to help organizations protect critical data and build trust with customers.