PKs are used for uniquely identifying data and linking tables. Basically they have no meaning to users. THere is an article on my web site that discusses using Integers as PKs and provides code to generate them. You can provide other keys as lookup keys for users.
>Hi all,
>
>Was wondering, is there any way of using two primary keys in sync in the one table?? I am using a a table to store information on bookings, and in the table, it should store customer details, time, date, etc.
>
>I can't have the primary key as "date" alone, as I will have more than one customer on any one day, and I also can't have "time" as a primary key alone, as I will have customers on different dates at the THAT time. E.G.
>
>customer1 12.00 02-03-2003
>customer2 14.00 02-03-2003
>customer3 12.00 02-04-2003
>
>My problem is, I need to link these two fields("time" and "Date") so that they together make up a primary key, so that there is no time (which is usually hourly, as it's for a sports centre) AND date which is identical to another time AND date in that table.
>
>Can I have corresponding primary keys in the same table or do I need to go about it a different way????
>
>All suggestions welcomed.
>
>Thanks in advance,
>Mick
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer