On Nov 5, 1:34*pm, Ken Sheridan
<KenSheri...@discussions.microsoft.com> wrote:
> Fred:
>
> A candidate key is simply a column or set of columns whose value, or values
> in combination, must be distinct in each row of the table. *Often a table
> will have several candidate keys from which a primary key can be selected..
>
> To designate a set of columns as a composite primary key, in table design
> view click on each while holding down the Ctrl key. *This will select them
> all. *Then right click on the selection and select Primary Key from the
> shortcut menu.
>
> A foreign key, which again can be one or more columns, is not designated in
> table design view. *Rather it’s a result of creating a relationship between
> tables. *The column or columns in the referencing (many side) table on which
> the tables are related is a foreign key.
>
> Sometimes its less cumbersome, even where there is a composite candidate
> key, to use an autonumber columns as a 'surrogate' primary key. *If this is
> done, however, any column or columns which constitute a candidate key must
> also be indexed uniquely to protect the integrity of the data. *An index on a
> set of columns is created via the View menu in table design view. *Select
> Indexes and in the dialogue and select the relevant column names in its
> second column, but put an index name (of your own choice) in only the first
> row of the first column of the set. *With this first row selected set the
> index properties in the lower part of the dialogue.
>
> Ken Sheridan
> Stafford, England
>
> "Fred" wrote:
> > In a response I received to a question, it mentioned that I should
> > create a unique index on the three or four column candidate key.
>
> > How do I do that?
>
> > It also mentions that three of my other ID columns constitute a
> > candidate key and can thus be the composite foreign key. *I thought
> > keys were based on one column??
>
> > I am new and don't understand the candidate/ foreign terminology?
>
> > Fred
Thanks for the information.
Fred
|