Andrej Koelewijn

5/2/2005

Native SQL support in C#

Filed under: — site admin @ 12:38 pm

There’s a discussion on the serverside: what if java had native support for SQL? It discusses a proposal by microsoft about embedding sql in C#. Somehow most people seem to be missing the point on what microsoft is doing. Most of the postings are comparing microsoft’s solution to sqlj or one of the many available ORM solutions.

The thing is, these solutions offer solutions of interfacing with a database. If you look at some of the examples on msdn, you’ll see that microsoft is proposing something more radical: completely replacing the database. You can actually use sql statements to query data from structs and arrays in your application. This means that your application will handle the parsing and executing of your sql.

This might actually make a nice solution for stand alone applications, where no central database is being used.

Update: This could be very usefull if you’re creating Occasionally Connected clients, where you want coarse grained communication with the server. For example, you could have a web service which returns all lookup/domain data (used by dropdown components, etc). This info you keep in memory in an array, but when you need it for a component in your gui, you can query the data using sql.

Powered by WordPress