Reply to Re: self referential database table

Your name:

Reply:


Posted by Ed Murphy on 05/23/07 05:24

aakbar@gmail.com wrote:

> is there a way without adding a column or what i am thinking to just
> reply on relationship between emp_id with itself is not sufficient.

You need some column that determines which row contains the current
data for a given emp_id - e.g. 'date_inserted', or 'is_active', or
an IDENTITY column. Rows are not inherently sorted in order of
insertion (Celko: "rows are not records") - you have to impose a
sort order based on one or more columns, which can match order of
insertion if you configure things to that end.

I agree (as I think I mentioned previously) with Erland's suggestion
of keeping current data in one table and history in another; failing
that, creating a current_data view and using it consistently.

[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

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