Table PRIMARY KEY issue

  • Thread starter Thread starter jonathan.cohen150887
  • Start date Start date
J

jonathan.cohen150887

hi,

Ok here is the deal:

I ahve a table with delivery method data in it.

SO its basically something like this

Delivery_Ref Delivery Type Delivery
Customer Price Delivery Publisher price

Now instead of having put the publisher price in the table above i
create the same table where i only had delivery publisher price in it
as I believe that having delivery_Ref as a PK for two different prices
creates conflict.

Should i keep it that way or should I combine the table for it to look
like the above as I dont like having two different prices for the same
PK.

Thanks
 
Also,

I want to create a table for customer payments, I also have a customer
order table.

The problem is that customer order table which comes first, has
customer_ref as a FK
So should i put customer_ref as an FK in the customer payments table
or as a PK numerical type?

Thanks
 
(e-mail address removed) wrote in
(e-mail address removed)
m:
Also,

I want to create a table for customer payments, I also have a
customer order table.

The problem is that customer order table which comes first, has
customer_ref as a FK
So should i put customer_ref as an FK in the customer payments
table or as a PK numerical type?

Thanks

There is nothing wrong in having two or more tables containing FKs
to one specific table.

As to putting Customer_Ref as a pk in the payments table, this will
limit you to a maximum of one payment per customer. I suspect repeat
customers will also have repeat payments.
 
Back
Top