Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Site Related Forums
 Article Discussion
 Article: Relational Operators in C#

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-02-04 : 18:17:05

The SQLTeam Weblogs have been running for a few months now, with some great content. Of particular note is DavidM's series on DataTable Relational Operators in C#. David has written methods in C# to reproduce the relational operators Join, Union, Difference, Divide, Interect, Product, Restrict and TClose using DataTables. The series concludes with an example using the Northwind database.


If you are doing any work with DataTables in .NET this is a must read. Thanks David.


Article Link.

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2004-02-10 : 06:52:01
I'm lost. What's it for?
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-02-10 : 07:01:23
DataSet "relational" operations. .NET's main result set (DataSet) has features that make it appear like an In Memory DBMS. It has "collections" of tables (DataTable), supports Primary Keys, Foreign Key's. The problem is there is no query engine.... The Introduction article gives the reason why I had to write it.

DavidM

"SQL-3 is an abomination.."
Go to Top of Page

Arnold Fribble
Yak-finder General

1961 Posts

Posted - 2004-02-10 : 07:30:12
Ah, I think I see. Because these DataSets are being sent to clients, it's reasonable to expect them to be small. So writing a set of operators that allow programmers to use a relational style when working with DataSets can be done in a fairly straight-forward way, without worrying about optimization between operators. Is that correct?
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2004-02-10 : 12:49:29
Not only that.
Just imagine a client that retrieves tabular data
from different, inaccessible to each other, sources.
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-02-10 : 17:24:50
That is spot on Arnold. And Stoad's comment is exactly why I had to do it. One set from DB2 and the other SQL Server.... It is with sad regret that I tell you that the middle tier does all the work now and the code has been assigned to the dust bin of source safe.


DavidM

"SQL-3 is an abomination.."
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2004-02-10 : 17:50:22
quote:

code has been assigned to the dust bin of source safe.


Then I hope you made another copy! You never know when SortaSafe is going to eat your code


Damian
Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2004-02-10 : 17:55:31
I think every one learns that the hard way Damian.. I have about 6 backups of my code library.

DavidM

"SQL-3 is an abomination.."
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2004-02-10 : 18:03:57
Tell me about it, I just set up FTP backups of my CVS repository. The thought of the backups stored in the same building kept me awake at night



Damian
Go to Top of Page
   

- Advertisement -