View Single Post
  #8  
Old March 6th, 2005, 02:17 PM
Chris2
external usenet poster
 
Posts: n/a
Default


"Rasoul Khoshravan Azar" wrote in message
...
Is it possible to have two Primary Key in a single Table?


Rasoul Khoshravan Azar,

As many others have already pointed out, the answer is no.

Definition of PK: "A Primary Key is the column, or combination of
columns (up to 10 columns in MS Access), that *uniquely* defines a
row." There can never be more than one.



Why do I ask this question?

After many misdesigns, I understand that it is a mistake to join one

PK of a
single table to two different tables. This design format is totally

wrong
and never works (if I am not right with this conclusion, please

correct me).
As a solution, I am thinking to put to PK in a single table so to

use each,
for separate join.


I'm not sure exactly what you mean here.

"JOIN" refers to running Queries. If your CPU can tolerate the
workload, you can run a query that has a JOIN of one Table's PK
against *many* other Tables (as long as the PK entity from the first
Table is found in the other Tables, of course).

If you mean "establish a relationship" (i.e. in the Relationships
window), then many Tables can reference the PK of another table via
Foreign Keys.




My DB is as follows:
This DB is aimed for the procedure of getting a ProformaInvoice(PI)

from a
seller, opening a Letter of Credit (LC) in a bank and shipment of
commodities.

ProformaInvoiceTbl
PIID (PK)
SellerID (a foreign key)
PInumber (set as PK)
... (other fields)


Did MS Access allow you to create the above Table?


Sincerely,

Chris O.