0

What is the line that you should draw when normalising data, in terms of data duplication? i.e would you say that 2 employees who share the same birthday or have the same timestamp for a shift is data duplication? and therefore should be placed into another data table?

philipxy
  • 14,867
  • 6
  • 39
  • 83
Ryan.W
  • 21
  • 3
  • Since nobody stores birth dates in an extra table, there is no common date for 2 employees. – juergen d Aug 07 '18 at 12:07
  • Time to read a book on information modeling, the relational model & database design. This is too broad a question. Yet it is also a faq. Please see [ask] & other [help] links & the downvote arrow mouseover text. – philipxy Aug 07 '18 at 23:18
  • [Understanding Normalization & Duplicates - I Guess I Don't](https://stackoverflow.com/a/44539858/3404097) – philipxy Aug 09 '18 at 09:35

3 Answers3

1

Birth date has full and non-transitive dependency to a person which means that it should be stored within the same table where you keep your employees and it would comply with third normal form (3NF).

Work shifts are not an attribute of an employee which means that they are a different entity and stay in relation with employee entity.

Kamil Gosciminski
  • 16,547
  • 8
  • 49
  • 72
0

There is no a particular 'limit' when following the normalisation to data, since the main restriction that is given for every relational database table is to have an unique parimary key. Hence, if all other columns contain the same data, but the primary key is still different, it is a different row of a table.

The actual restrictions can come in two form. One is either the programming or systhematic approach, where the restriction on what kind of data is inputed is given from a program which interacts with the database or already defined script handed down physically for the admin of the database.

Other, more database-orriented approach would be to create primary keys composed of multiple columns. That way a row is unique only if for both columns the data is unique. It should be noted that a primary key is not necessary the same as an unique key, which should be different for every instance.

Fikret Basic
  • 350
  • 1
  • 7
0

You have misunderstood what normalization does.

  • Two attributes having the same value (i.e. two employees having the same birthday) is not redundancy.
  • Rather having the same attribute in the two tables (i.e. two tables having birthday column, therefore repeating every employee's birthday information) is.

Normalization is a quality decision and denormalization is a performance decision. For my school projects, my teachers recommended me to normalize at least till 3NF. So that may be a good guideline.

displayName
  • 13,888
  • 8
  • 60
  • 75