Welcome to MSDN Blogs Sign in | Join | Help

Training and More

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.

Published Sunday, September 26, 2004 4:34 PM by acoat

Comments

# re: Training and More

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
Wednesday, September 29, 2004 1:00 PM by Nathan Allan

# re: Training and More

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.
Wednesday, September 29, 2004 11:42 PM by Andrew Coates

# Set-based Query Languages, Databases and Buses

Tuesday, October 05, 2004 9:11 AM by notgartner.com: Mitch Denny's Blog

# Andrew Coates MSFT Training and More | Quick Diets

Tuesday, June 09, 2009 11:34 PM by Andrew Coates MSFT Training and More | Quick Diets
New Comments to this post are disabled
 
Page view tracker