Answer the question
In order to leave comments, you need to log in
How to follow the first normal form rule?
One of the 1NF rules says:
" no two rows can be identical "
Consider a table "enterprise working hours" of 3 columns
id - enterprise identifier
timeopen and timeclode - opening and closing times (end and beginning of the working day)
Formally, they are different for many - someone works from 8:00, 8:30, 9:00, 9:30, 10:00, etc. + the same with the end time. And there are exotic options like lunch from 12:00 to 12:45. But with a large number of enterprises, repetitions will definitely appear in the table, and the more enterprises, the more repetitions ...
Question: how to correspond to 1NF in this case and is this correspondence necessary (reasonably)?
Answer the question
In order to leave comments, you need to log in
Under "there are no repeating lines" in a crooked Russian translation, "there are no repeating tuples" is meant.
The values in the fields can, of course, be the same.
Since "id - enterprise identifier" you want to believe is unique, then by adding a unique key to the id field you will comply with this requirement.
enterprise id is md5($nameorg.$idorg); or simpler id = idorg and no auto-increment in this table.
Question: how to correspond to 1NF in this case and is this correspondence necessary (reasonably)?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question