You are here: Re: Regarding table Order « MsSQL Server « IT news, forums, messages
Re: Regarding table Order

Posted by --CELKO-- on 12/16/05 15:32

>> Is there something wrong in the query? Or if someone can tell me a better approach. <<

The correct terms are "referenced" and "referencing" tables; "child"
and "parent" are terms from IDMS, IMS and other network DBMS systems.

It is always a dangerous thing to do queries and execture statements on
the schema information tables. It says that you do not know what you
are doing until run time.

Why not put DRI actions for ON DELETE CASCADE on the referencing tables
and let the system do the work properly so you do not have to do this
kind of manual housecleaning?

Why do you allow users to define tables on the fly in a production
database? That means you have no data model and users control the
schema, so you do not even know the names of your entities.

TRUNCATE is both proprietrary and dangerous (see what it does with
logging, its limitations, etc.)

The kludge to fix the bad design is to create DELETE FROM statements on
the fly. The real answer is to get a workable schema and to get rid of
this code.

 

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

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