views:

39

answers:

2

Hi,

I am really struggling to normalise a Client Meeting form.

The details are as follows

Client_Name, Client_phone (Normalised)

Date, Time, Location, Person_met, location, key_notes, Staff (repeating groups)

In 1st NF, I know the Client_Name (given a client_ID key) would be the foreign key in the repeated group, but I don't know which attribute would be the primary key.

Would Date and Time identify the meeting? Not sure if you can have two primary keys?

Any help would be much appreciated.

+1  A: 

I think Date, Time and Location should be the composite primary keys (you probably can have more than one meeting at the same time..).
I'm not sure what you mean by "repeating groups" though.

Oren A
Thanks for that, it makes sense. In reference to the repeating groups, what I mean is that to remove data that could be more than one entry in a table of an attribute. I.e. on the form that stores the clients meetings, as a table, there would be more than one occurrence of date, location, person met etc.
dbuser
A: 

personally I do not like composite keys unless there is a physical reason (eg: it will be used to jump hierarchies). I would suggest a surrogate key. PKs should be a naturally occurring, unique, mandatory and preferably stable (ie not modified). Since this happens rarely, a surrogate key ( a column added that is assigned an incremented number usually by the RDBMS) is normally (no pun) used.

In your example, date and time should not be the PK as there could conceivably be two meetings with that exact date and time ( as unlikely as that is, still...). If you have to have a composite key, then date, time and client name would be needed pt make it unique as the same client cannot participate in two meetings at the same instant (right?) Also, I notice location is in there twice. Probably needs to be a location id with location in a separate lookup table, per 3rd NF.

Joe