1

I have done data normalization on dummy data and would like to know if I did it correctly. If it is done correctly, I would also like to ask two things below, because it is about 3NF.

1NF: This table should be 1NF.

userId userName keyNumber keyCode accessGroup doors
1 Alice 1 1 1 1
1 Alice 1 1 1 2
1 Alice 1 1 1 3
2 Bob 2 2 2 1
2 Bob 2 2 2 2
3 Alice 3 3 2 1
3 Alice 3 3 2 2

2NF: I selected composite key (userID and Doors) as they represent minimal candidate key and got three tables applying FD rule.

Primary_key: userID

userId userName keyNumber keyCode accessGroup

Primary_key: doors

doors

Primary_key: (userid, doors)

userId doors

3NF: Applying the rule of transitive dependency on 1st table in 2NF, I got out 4 tables (showing only first two, because the last two remain unchanged)

Primary_key: userID

userId userName

Primary_key: keyNumber

keyNumber keyCode accessGroup
1 1 1
2 2 2
3 3 2

Questions:

  1. Is this database normalisation correct? If not could you point me where I did mistake?
  2. If answer on first question is True: Should the last table in 3NF be transformed into two tables, given it is not in correct Third normal form. Two non-key atributes have FD keycode -> accessGroup
philipxy
  • 14,867
  • 6
  • 39
  • 83
filtertips
  • 801
  • 3
  • 12
  • 25
  • Re "is this right": Show the steps of your work following your reference/textbook, with justification--not all terms/notations are standard & we don't know exactly what algorithm/method you are following & we want to check your work but not redo it & we need your choices when a process allows them & otherwise we can't tell you where you went right or wrong & we don't want to rewrite your reference. [ask] [help] [How do I ask and answer homework questions?](https://meta.stackoverflow.com/q/334822/3404097) Basic questions are faqs, research before considering asking & reflect research. – philipxy Aug 05 '22 at 22:04
  • Please act on all my comments on [your previous post](https://stackoverflow.com/q/73241985/3404097) asking about how to normalize. Especially: Where & how are you 1st stuck/unsure in what process you quote? PS We don't normalize to 3NF by going through lower NFs. ["1NF" has many meanings.](https://stackoverflow.com/a/40640962/3404097)--quote yours. What textbook/reference are you following--name & edition? You don't give FDs but they drive the process. A CK is a (so-called) minimal superkey, "minimal CK" doesn't mean anything. Don't know what "FD rule" or "apply a FD rule" mean. – philipxy Aug 05 '22 at 22:48
  • @philipxy Thank you for your comments, but I won't apply anything or explain anything to you anymore. If you feel I didn't provide enough information or violated any rules, feel free to close the topic. But then I am closing my StackOverflow account as as well, naming you as a reason. – filtertips Aug 06 '22 at 06:23
  • I have only written helpful, appropriate & neutral comments & I explained & justified why I commented. After informing yourself re how the site works, if you think I have been inappropriate, besides flagging a post or comment for a moderator you can consider asking an on-topic question about your questions and/or my comments at [meta] (but beware "meta effect" attention you will get on your questions). See help & Q&A there & at [meta.se] re how the sites work. Good luck. – philipxy Aug 06 '22 at 06:29
  • I would appreciate it if you don't comment on my posts anymore. I won't follow any of your requests. Thank you. – filtertips Aug 06 '22 at 06:34
  • Comments are about posts not posters & can be for all readers not just posters. Bye. – philipxy Aug 06 '22 at 06:36

0 Answers0