Reply to Re: what are cursors in sql???

Your name:

Reply:


Posted by Stu on 03/02/06 17:19

Sorry to butt in, but I think the answer to the question of "to curse,
or not to curse" (what else would you call stepping through a cursor?)
lies in David's statement of what the "average SQL programmer" does.
Some of us are outliers.

I think that if you do a lot of integration work where you're
retriveing data from databases where you have little control over the
design (ie, third-party applications, legacy databases, etc) then
you'll find yourself using more of the specialty tools of SQL Server
than standard SQL. If you're working in data warehousing where data
denormalization is a standard practice, then flattening your data
during the import process using a cursor may be a viable option (and
possibly your only viable option).

However, I do agree that 99% of the time for MOST developers, cursors
are not the optimal choice, and if you work with them a lot, it's a
struggle to think in set-based terms. In my shop, we alternate between
OLAP and OLTP a lot, and I have to mentally switch gears to keep from
applying procedural logic to my relational designs and relational logic
to my procedural operations.

To answer the OP, I think David is correct; ignore cursors for now.
Learn how to design and think in sets, and save row-based operations
until much later in your career.

Stu

[Back to original 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

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