1

I made an ER of my table, im not sure if its correct. In my table (0NF) are 5 columns: DocumentID, DocumentTitel, revNr., userID, modifiedDate. The table gives an overview which person changed which document.

My data (0NF):
https://i.stack.imgur.com/zwzUo.jpg

ER diagram (bold text = primary key):
https://i.stack.imgur.com/FL9lJ.jpg

Is my ER (1:1) correct for my data? Can I normalize further?

Fred
  • 121
  • 1
  • 6

1 Answers1

0

The relationship expressed in your ER diagram appears to be one-to-many, not one-to-one (because DocumentId alone is not unique in the Version table.)

Normalization should always be based on an understanding of the business rules that are applicable in your intended design. It isn't sufficient to draw conclusions based only on some sample data.

For example, in your case we might easily infer from just two rows of sample data that both {DocumentId} and {Title} ought to be keys in your Document table, or that {DocumentId,revNr} and {DocumentId,modifiedDate} ought to be keys in the Version table. If those were accurate assumptions then your design is incomplete and could certainly be further normalized and improved. Only your knowledge of what dependencies you need to enforce can help you make these design decisions.

nvogel
  • 24,981
  • 1
  • 44
  • 82
  • Can I say that my ER is 1NF? If so, does that mean its also 2NF because userID and modifiedDate depend on both keys(revNr and DocumentID)? – Fred Dec 10 '14 at 18:32
  • To answer these questions properly you need to write down the dependencies that are supposed to be satisfied. 2NF is not really important. Aim for a design that satisfies at least BCNF or 5NF. – nvogel Dec 10 '14 at 21:29