You are here: Re: Cursor looping versus set-based queries « MsSQL Server « IT news, forums, messages
Re: Cursor looping versus set-based queries

Posted by Erland Sommarskog on 03/29/06 10:32

Robert Klemme (bob.news@gmx.net) writes:
> Erland Sommarskog wrote:
>>> * Different data from the same row needs to be inserted into multiple
>>> tables. "Common sense" (maybe "gut instinct" is better) says to handle
>>> each row as a "unit". Seems weird to process the entire set for one
>>> table, then to process the entire set AGAIN for another table, and then
>>> YET AGAIN for a third table, and so on.
>>
>> I'm not sure that I understand this point. As I mentioned, I usually
>> have my input to my set-based procedures in a table, so I don't really
>> see the problem.
>
> I think what Jay is up to here is mapping of an OO model to a relational
> model. There is one "master" table which represents the root class of
> his hierarchy and several tables for specific types. I've never worked
> with user defined types but maybe these are an option here as well.

I suppose you are thinking of the CLR UDTs added to SQL 2005. No, they are
not an option here. CLR UDTs are for small values that always go together,
and where you rarely would search for the individual values. Personally, I
see CLR UDTs as a fairly marginal benefit.

As for the structure of Jay's tables, I have no problem to understand it,
as I work with securities myself, and different classes of securities
have different properties.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация