in

Dé specialist in .NET trainingen en consultancy

Thomas Huijer

februari 2009 - Posts

  • The value of MSchema

    I recently was in a session on Oslo, when someone at the very end asked: “But this MSchema thing isn’t really different than T-SQL, is it?”. Well, that person completely missed the point of M and Oslo. MSchema is so conceptually different than T-SQL DDL, that I thought it’d be worthwhile blogging about it. Let’s consider this tiny piece of T-SQL DDL:

    CREATE TABLE Person
    (
      ID int Identity(1,1),
      FirstName char(20),
      LastName char(20)
    )

    What are the three key points that we’re doing here?

    1. We’re modeling a Person here with an ID that is its identifier, and we define that a Person also has a firstname and lastname
    2. We’re creating a table in a relational database to hold Person instances/records/tuples
    3. We’re using a dialect of SQL that only Microsoft SQL Server understands.

    Fine, nothing too difficult. Now let’s consider this piece of MSchema:

    module Sample
    {
      type Person
      {
        ID: integer32,
        FirstName: Text where value.length <=20,
        LastName: Text where value.length <=20
      } where identity ID;

      Persons: Person*;
    }

    And let’s see what the keypoints are that we’re doing here:

    1. We’re modeling a Person here with an ID that is its identifier, and we define that a Person also has a firstname and lastname

    That’s it. We’re just modelling. Nothing more. It’s got nothing to do with SQL Server. Better yet, it’s got nothing to do with relational databases. And better yet, it’s got nothing to do with any database. It’s completely independent of what we’re going to do with it. It’s just the model, the pure essence of what dealing with in our application. MSchema is not tied to what platform, framework or technique whatsoever. And that is the big value of MSchema: its total independence of implementation.

    (and of course, it’s so easy to put a view on a certain model. Meaning: we can easily convert MSchema to any SQL DDL of any database. Right now, Microsoft has implemented two of those ‘converters’, but anyone can add their own to support the database of their choosing. But we may also choose to convert it into something completely different, like an XSD or an EDMX).

    Posted feb 07 2009, 09:05 by Thomas with no comments
    Filed under: , ,
  • Windows 7: certainly a big improvement

    I can only agree with others on the internet about the quality of the first beta of Windows 7. It’s pretty stable, it performs better than Windows Vista and it’s got some great new features. I had a harddisk-crash last week and made the bold decision to install the Windows 7 beta instead of Windows Vista. I ran into a couple of minor issues, but overall I’m impressed with the quality of it. Since the driver model did not change between Vista and Windows 7, all drivers should work just fine. And in my case they did. So, I’m happy with it. Especially with the new slider to control the UAC settings. ;-)