General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Primary Key question
I am wondering if I could get some of your opinions on an issue that I have struggled with for quite some time. I seem to go back and forth on this issue.
I am using Visual Maxframe Professional and I am using the routines built in it for creating pk's for each table. Along with the pk's I generally have another unique ID.
Lets take a simple example...a customer file has both a pk field and an acctno field. I also have an invoice table with both a pk field and an invoice# field.
For each invoice there are multiple line item records. What I am curious about is whether I should put the invoice pk or the invoice# in the sold line item table and also if I should put the customer pk or the customer acctno field into the invoice table.
I know this is a pretty stupid question but since I have struggled with this quite a few times with other programmers I thought I would try to get anyone else's opinion.
Thanks,
Paul Acton
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only