-1

I need to normalise this table to 3rd normal form. Clearly showing the stages of 0NF, 1NF, 2NF and 3NF. State any assumptions you can make Use relational symbolic notation.`Normalisation

I have made the following assumptions in this task:' It is established that one owner can have multiple pets. One pet can go on many walks.

ONF R1 = (Owner #, Owner Name, Owner Phone, {Pet#, Pet Name, Walk Date, Walk Duration, Paid, Walk Notes})

1NF-

R11 = (Owner #, Owner Name, Owner Phone)
R12 = (Pet #, Owner #, Pet Name, Walk Date, Walk Duration, Paid, Walk Notes)

2NF
R11 = (Owner #, Owner Name, Owner Phone)
R12 = (Pet #, Owner #, Pet Name, Walk Date, Walk Duration, Paid, Walk Notes)
R121 =(Pet #, Owner #, Pet Name)
R122 = (Pet #, Walk Date, Walk Duration, Paid, Walk Notes)

3NF
Already in 3NF as no transitive dependencies exist.

Just wanted to see if this was correct?

trev0ck
  • 9
  • 5
  • 3
    ["0NF" & "1NF" have no single meaning.](https://stackoverflow.com/a/40640962/3404097) So you need to tell us your textbook name & edition. Show the steps of your work following it--we want to check your work but not redo it, we need your choices when an algorithm allows them & otherwise we can't tell you where you went wrong (or right). See hits googling 'stackexchange homework'. What do you claim are the FDs & why? What role does that table play--are we decomposing a variable that has the same FDs or is that just a value the variable could hold? – philipxy Mar 18 '19 at 07:32
  • 1
    Please [use text, not images/links, for text--including tables & ERDs.](https://meta.stackoverflow.com/q/285551/3404097) Use images only for what cannot be expressed as text or to augment text. Images cannot be searched for or cut & pasted. Insert images using edit functions. – philipxy Mar 18 '19 at 07:32
  • 1
    Poor title. Rewrite to summarize your specific issue, distinct from all the other normalization questions. – Basil Bourque Mar 18 '19 at 07:32
  • You need to provide FDs in order to do this. Oh, and don't post your homework. – nicomp Mar 18 '19 at 07:41
  • @nicomp What's wrong with homework? Moreover, they seem to have done it. – philipxy Mar 18 '19 at 07:44
  • @philipxy We will agree to disagree on the issue of posting homework. – nicomp Mar 18 '19 at 07:46
  • PS To normalize we need to know a FD *cover*--we need to be able to know for *every possible FD using the attributes* whether it holds. Your image, if it is a relation, shows some FDs that don't hold & you give a couple assumptions that lead to more FDs that don't hold. But we need to know or assume more before we can normalize. But you normalized--so either you didn't tell us all your assumptions or you don't know that you forgot to address every FD. PS The image is in just about any version of 1NF. Using just about any version of 0NF & its notation your 0NF does not describe that data. – philipxy Mar 18 '19 at 08:19

1 Answers1

0

You dont have any transitive dependency but

---All initial relation are in 0NF

---1NF:

Each table cell should contain a single value.

Each record needs to be unique.

---2NF you should split walk and pet for avoiding redundancy: because if you insert new pet without walk session , you have 4 columns without value . for 1000 new pet it will be bad . it is so bad for update and delete a walk session

R1 = (Owner#, Owner Name, Owner Phone)
R2 = (Pet#, Pet Name,Paid, Owner#,Walk#)
R3 = (Walk#, Walk Date, Walk Duration, Walk Notes)
esnkrimi
  • 140
  • 1
  • 8
  • How can you tell there are no transitive dependencies? – nicomp Mar 18 '19 at 07:42
  • transitive dependency :(example) (col1,col2,col3,col4,col5,col6) that col1->col4 and col4->col5 and col4->col6 you should remove transitiv dep by split table : {col1,col2,col3,col4} and {col4,col5,col6} – esnkrimi Mar 18 '19 at 07:44
  • Normalization does not deal with insertion & deletion anomalies. Moreover, they don't involve redundancy. I would agree that we might notice them while normalizing. I would agree that they are sometimes taught as part of normalization even though that is a wrong idea. We might see them and realize that we have the wrong design. But you have no justification that this is the wrong design. PS Your English is very difficult to understand. – philipxy Mar 18 '19 at 07:52
  • Okay once I have done that in 2NF, and added a "Walk #" attribute, do i need to include that in 0NF and 1NF aswell? Thanks. @esnkrimi – trev0ck Mar 18 '19 at 08:35
  • Yes you are in 3NF and everything is ok initial relation is 0 NF for 1NF: Each table cell should contain a single value. Each record needs to be unique. – esnkrimi Mar 18 '19 at 09:21