C
Christo Yssel
Hi,
I have one of 2 options. Which would be the best to use?
Table: Customers, CustomerID (PK)
Table: Addresses, AddressID (PK)
CustomerID (FK)
AddressType {PA - Postal address, DA - Delivery
Address etc.}
Customers may have more than one address, but only one postal address, one
delivery address.
Should the address table have a PK, AddressID and then an unique index
CustomerID and AddressType or can I use a Composite PK based on CustomerID
and AddressID where you then do not need AddressID as a PK?
Thanks
Christo
I have one of 2 options. Which would be the best to use?
Table: Customers, CustomerID (PK)
Table: Addresses, AddressID (PK)
CustomerID (FK)
AddressType {PA - Postal address, DA - Delivery
Address etc.}
Customers may have more than one address, but only one postal address, one
delivery address.
Should the address table have a PK, AddressID and then an unique index
CustomerID and AddressType or can I use a Composite PK based on CustomerID
and AddressID where you then do not need AddressID as a PK?
Thanks
Christo