473,883 Members | 1,544 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000?

Hi All!

We are doing new development for SQL Server 2000 and also moving from
SQL 7.0 to SQL Server 2000.

What are cons and pros for using IDENTITY property as PK in SQL SERVER
2000?
Please, share your experience in using IDENTITY as PK .
Does SCOPE_IDENTITY makes life easier in SQL 2000?

Is there issues with DENTITY property when moving DB from one server
to another? (the same version of SQL Server)

Thank you in advance,
Andy
Jul 20 '05
112 10383
We have a couple of developers who made a database where every table
has an artificial key, and then they reload a number of the tables
every night and the keys change. I am not making this up.

On Tue, 02 Dec 2003 23:19:10 GMT, "Greg D. Moore \(Strider\)"
<mo*****@greenm s.com> wrote:

"BenignVanilla " <bv@tibetanbeef garden.com> wrote in message
news:O5******* *************@g iganews.com...

I am by no means a SQL expert, so forgive me if this seems ignorant...But
why can't the ID columm be a natural key? For example, I am working on a
project that has a vendors table. The list of vendors is used in
relationship to several other tables. We build this table with an identity
column, and a column with the vendor's name. Now when a vendor is added to
the table, they are assigned a unique ID that ties all other related data
back to this vendor, and in the case of a vendor changing their name, or a
typo, we can make updates without affecting data. Seems like a perfect use
for an identity field, and it is our primary key.


And what happens if someone does a DBCC checkident ('FOO', RESEED)?

Or you have to copy it into a new table and accidently set that table up
with an IDENTITY column and now all your rows get new IDs?



--
BV.
WebPorgmaster - www.IHeartMyPond.com
Work at Home, Save the Environment - www.amothersdream.com


Jul 20 '05 #111
Come off it, Bob. Joe Celko and Ralph Kimball are hardly ignorant
about database design, and they both prefer natural keys.

On Thu, 4 Dec 2003 09:03:40 -0500, "Bob Badour" <bb*****@golden .net>
wrote:

"BenignVanilla " <bv@tibetanbeef garden.com> wrote in message
news:a7******* *************@g iganews.com...

"Aaron Bertrand - MVP" <aa***@TRASHasp faq.com> wrote in message
news:#f******** ******@TK2MSFTN GP11.phx.gbl...
> > Then I can only conclude you lack the ability to comprehend relatively
> > simple written english.
>
> Geez, why are you so hateful and insulting? I have absolutely nointerest > in following a conversation where every second post has a useless barb

or
ad
> hominen attack.
>
> Die, thread, die.


I concur, aside from Mr. Badour's immature, and hateful pokes, this thread
has been great. Hopefully he'll go away, or someone will mention hitler so
we can consider this thread dead.


I don't hate anyone. I provide truly helpful information to those who
actually want to learn. Making accurate observations regarding the apparent
source of the ignorami's sophistry helps those who might otherwise be duped.

In this particular case, the sophistry was little more than a
deconstruction ist denial of meaning (without the actual deconstruction of
course). The man who posted it is nothing more than a self-important, puffed
up, vociferous ignoramus, and it is a service to the world to point out this
fact. Any rational, thinking person should find his post an insult to their
intelligence .

Mr. Vanilla, what was so great about this thread? Did you find it
informative? Did you find comfort in the repetition of your own
misconceptions ? What was great?


Jul 20 '05 #112
RStringfield
1 New Member
> "Bob Badour" <bbadour@golden .net> wrote in message
>A VIN is not a car. It is a surrogate invented by the automobile industry
>and assigned by the manufacturer.

It is a surrogate for a car. It would not be a surrogate key for a car table. It is not a surrogate key because vin would be an attribute in the table and it is logically connected to other data in the table, e.g., make, model, etc.

You are confusing surrogate with surrogate key, when they do not really mean the same thing. Further, you are confusing the object that is being replaced. A surrogate key is a substitute for the other data in the record. The entire record is a substitute for a car.

Surrogate key may be a poorly chosen term, but it is what it is, and that has nothing to do with the discussion.

Natural keys are neither surrogate keys or a subset of surrgate keys.
Jul 22 '06 #113

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2304
by: Phil W | last post by:
Hi all, Am having a bit of trouble with the @@identity field - I probably just have that friday feeling and am missing off something obvious, but the below code brings back am empty identity value ("sid" appears empty). I've definitely set up an identity field in the tblSurvey: set rsAdd = Server.CreateObject("ADODB.Recordset") rsAdd.open "tblSurvey", conn, 3 , 3 rsAdd.AddNew
3
11446
by: Mark | last post by:
Hi, How to add a foreign key constraint using the SQL server 2000 enterprise manager? Not by SQL. thanks
0
9936
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9791
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9571
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7970
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5797
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5990
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3231
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.