Len Boorman
Back in gainfull employme
- Local time
- Today, 14:15
- Joined
- Mar 23, 2000
- Messages
- 1,930
So I take it that the tblAttendance isn't circular then? The relationship are defined correctly?
Sounds right but jury still out a bit still. need to mull it over. Only got a majority in favour at the moment
Can live with that although it does reinforce the importance of the initial design phaseYes, you are right that tblAttendees is really registration. I'm just too afraid to re-name tables after a particularly bad episode in past with updating the new name. There were three steps: change name in VBA which isn't bad as I can use Find & Replace, change name in Access forms (it's a subform, which I can't find & Replace, so have to step gingerly here), and of course AutoCorrect won't help anything here, which I had turn when I created the database. At least I can identify it as keeping registration in its properties field.
As for offices/counties, actually a office may cover more than one county, and for our reporting, we need to indicate which county we held our workshops, that's all. Because offices are given a specific boundary, we can tell which office taught a class based on which county it was.
Just shows how difficult it is to comment/advise on another persons project
Gender table has one more entry: Unspecified, which Yes/No field wouldn't be sufficient and from design perspective, using triple state (Yes/No/Null) may be confusing to my users, so I decided to outsource the three options to a table: Male, Female, Unspecified.
Unspecified eh. Unusual but we live and learn. Yes triple state would confuse the hell out of a user
Very interesting tidbit about setting a unique index for a lookup table with single attribute! I didn't know that. I'm not sure if I understand how a duplication can be created with same person?
Example
PersonID........1 This is the PK
Name.............Fred
lots or records here
Next record
PersonID......598763
Name...........Fred Actually same Fred as before. New User did not know he had been here before
Shows that PK's need to be chosen carefully and potentially the need for a Non Meaningful PK but a meaningful unique index
There may indeed be more than one Fred so Name combined with First address line is probably okay. Unlikely 2 Freds at same address, Could have used DoB as alternative maybe again with Fred. You need to weigh up what you are going to go for.
With something like Category where you are only going to have a description then why store 2 fields both actually with unique Index's (all PK's have Unique Index) when one will do the job admirably.
Same for using FKs as a PK. I was aware that you can create a composite keys, but some seems to favor using a separate PK and at that time, seemed prudent to me since what if say ClassID get changed for some reason, which would require changing the ClassID in tblAttendee, and if it's a PK, it'd violate the rule of PK that it must be durable; never changes?
There are various schools of thought on PK selection. In my opinion Meaningful PK where I prefer. Purely my opinion and preference as basically I am in a "Identification by Number" type enviroinment. I can also appreciate the other school of thought and do not say it is wrong at all.
PK Durable and never changes. Absolutely but believe this says that the attribute you have chosen as PK never changes. There is no problem with the value changing is there. That is very much to the fore where you inly need to change a single value for the Cascade Update to kick in. Example. I have a project called LJB1 which later changes to JLB1. PK has not changed, only its value
L