Should I change/normalize my ER (1:1) diagram?

121 Views Asked by At

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?

1

There are 1 best solutions below

2
On BEST ANSWER

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.