> i was wondering, is there a difference in declaring a column as the primary
> key vs. just declaring it as an index?  Does a primary key go faster in
> lookups than an index?

If you declare a primary key it will cause a unique index to be created on the
column(s) you specify.

A primary key is different from a regular index in that a regular index allows
duplicates and NULLs.  You can explicitly make an index UNIQUE and enforce a
NOT NULL constraint on its column(s) in which case the index is similar to a
primary key.  There should not be any speed difference between a primary key
and a not null unique index.

Usually, a primary key is used when you are setting up a primary/foreign key
relationship, but I believe R:Base allows you to specify that a foreign key
references a unique index as well as a primary key.
--
Larry

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================

Reply via email to