Andrew Coates ::: MSFT

It's all about community!

Training and More

Training and More

  • Comments 4

I've just spent 4 days of last week on Readify's excellent Industrial Strength .NET Course, lead by the incomporable Mitch Denny. Things really started to hot up on the last day when we discussed the merits of natural vs artificial primary keys in tables (try as we might, we couldn't get Mitch to see the light <g>). Mitch also proposed the ditching entirely of SQL to be replace with an object-oriented construct something like:

objectDataSet Customers = new objectDataSet("select * from Customers");
objectDataSet ImportedCustomers = new objectDataSet("Select * from ImportTable");
objectDataSet MissingCustomers = ImportedCustomers - Customers;

An interesting overloading concept, but it leaves a lot of questions unanswered.

  • A difference operator is hardly an "object-oriented construct" and the idea of a relational difference operator has existed since Codd first laid the groundwork 35 years ago. Though not used by most SQL systems, there are systems that support such capabilities. For instance, the expression you have in your example would look like this in D4 (see Dataphor):

    var MissingCustomers := ImportedCustomers - Customers;

    For more information on difference and other relational operators, see "An Introduction to Database Management Systems 8th edition" by C. J. Date. This book should be in everyone's library.

    Regards,

    --
    Nathan Allan
  • Hi Nathan,

    OK, I guess expressed that poorly. It's not the difference operator that's OO, but the concept of having data "objects" that we're taking the difference between. Date (mine is the 6th edition, but I guess this bit hasn't changed much) talks about the problem of type-compatibility (chapter 6 in my edition), and I guess that was what I was alluding to.

    In relational algebra, relations involved in difference operations (and Union and Intersection) need to be type compatible (that is, the tuples in each set are the same type), but I'd see a case for having a difference operator, for example, that used a primary key from eack set to do the difference and then retained only the fields that were common to both sets.
  • PingBack from http://quickdietsite.info/story.php?id=9342

Page 1 of 1 (4 items)