Primary Key Question

  • Thread starter Thread starter samah
  • Start date Start date
S

samah

In my database I have a Sales table. The data in this table will be used
to analyze and summarize Sales related info in various reports.

For Cash Memos and Credit Invoices two different serial numbers are
used by the company. Pre-numbered Cash Memos and Credit Invoices are
issued by the salesmen on the spot of delivery. So on a daily basis, we
will be receiving Cash Memos and Credit Invoices with different serial
numbers as follows.

CREDIT INVOICES
Salesman 1 0000001
0000002
.......

Salesman 2 0000050
0000051
.......

CASH MEMOS
Salesman 1 C 0000001
C 0000002
.........

Salesman 2 C 0000050
C 0000051
.........

There are seven salesmen and each pre-numbered Cash Memo/Credit Sales
pad contains 50 leaves.

Can I use these Cash Memo/Credit Invoice numbers as Primary Key for my
Sales Table or should I go for autonumber? Any advice will be highly
appreciated.

Thank you in advance.

-samah
 
I'd use autonumbers as the glue to link the various tables together.

However you also need the Cash Memos and Credit Invoices information. I'd
keep them in one or two fields which would what unique index constraints to
keep out unwanted duplicates.
 
Back
Top