|
Posted by Tony Rogerson on 11/27/05 19:19
The IDENTITY property is not a physical locator, its simply a means to
generate an automatic incrementing number - check the product spec for more
information.
Other methods of creating incrementing numbers involve using the MAX on the
id column which gives a heavy performance degradation because of locking
over using the IDENTITY property.
Check the current ANSI standard and you will see an implementation around
this.
Many people use an IDENTITY property to populate a surrogate key instead of
bloating tables copying your natural key around.
In this posters case, i've used ASPUpload myself, they are saving a file to
the file system and want to record a locator to the file, often i give
uploaded files FL001.PDF for instance as you can't get at the original file
name, also, even if you could its from mulitple users who may well use the
same filename so the natural key as it would be (filename) is useless,
unless you want to force people to have different file names adding
complexity and spoiling the UI experience.
--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"--CELKO--" <jcelko212@earthlink.net> wrote in message
news:1133099654.649751.270530@g44g2000cwa.googlegroups.com...
> What you are asking for sounds like a kludge caused by a bad design.
>
> Wouldn't life be much easier if you used a design with real Relational
> keys instead of a proprietary exposed physical locator like IDENTITY
> to mimic a sequential file structure?
>
[Back to original message]
|