If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Primary vs alternate key

We have a table that we acquired from a vendor that has tables with PK of varchar2(1000) - the requirement is to stick to the same table design, so for the new SELECT only tables that we are adding that need to reference to this varchar2(1000) field, I was thinking of just using AK for uniqueness and not making it part of the PK. Any thoughts/suggestions on this ? BTW What is the difference between Primary key & alternate key - apart from alternatekey being able to store NULL. They both are unique & they both have indexes. Is there a difference in the way the Indexes are stored ?

Yes AK can be used for foreign key reference. I am currently doing that wherever possible as the PK is a varchar2(1000).

If I need to reference this PK in another table, how about making it an AK in the reference table ? e.g.

Table1
A varchar2(1000) - Primary Key

Table2
A Varchar2(1000) - references to Table1
B Number
A & B Combo is unique in Table2.

For the above scenario, I hate to make 'A' in table2 as part of the primary key due to its size. Since I need to enforce the uniqueness, can I make it part of the AK or since there really is no difference between AK & PK as far as storing/indexes goes, it does'nt impact whether 'A' is part of the PK or AK in Table2 ?

In other words, which of the following is a better design :
Table2
A Varchar2(1000) - (FK) (PK,1)
B Number (PK,2)
OR
Table2
A Varchar2(1000) - (FK) (AK,1)
B Number (AK,2)