-1

I have had a crack at normalizing some data for a database would appreciate if anyone body could tell me if its correctly normalized. Here is the structure:

enter image description here

I have used a composite key(Incident ID and Action code) as a certain incident would not require two actions of the same type. Is there a better way of doing this? I thought about just adding an Action ID auto number but is this OK?

Thanks if anyone can help.

1 Answer 1

0

Personally I would use ActionID as my key - it really depends on what you'll be doing with the data and the volume.

I could see it being useful to get a list of incidents where you'd taken out a particular Action, this would be easier to get with an index on just Action Code, also having a composite key could well result in page splits on the clustered index which obviously has an overhead.

5
  • Hi Andy, Thanks for the feedback. Should I add Action ID to UNF and normalize again? As this needs to be documented I don't believe I can justify generating a ActionID during 1/2NF? Jan 13, 2014 at 11:14
  • I really wouldn't get too hung-up on 1st 2nd 3rd NF - as they say "normalise until it hurts and then de-normalise until it works". I'd just add ActionID to your Action table, obviously I don't know what your requirements are in terms of documentation, But if you have to document the steps to 3nf, I would seriously question it as what's wrong with 4NF, 5NF etc?
    – AndyReilly
    Jan 13, 2014 at 11:22
  • Thanks again Andy. It does need to normalized to "3NF or BCNF". Adding the action ID should only effect the 2NF slightly though. Thanks, Simon Jan 13, 2014 at 11:29
  • Normalization never involves creating new columns ex nihilo. Jan 13, 2014 at 12:28
  • No but I could add Action ID to UNF ? Jan 13, 2014 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.