The Normalization basically required for eliminating the ambiguities at searching for given in BD and for reduction of the general size BD all this is reached due to corresponding to decomposition given on table.
The Main rule, which necessary to remember - in database it is necessary to keep only necessary information, and herewith all data must be kept in one place only. If neglect him, that can appear the following problems:
- The Database will have a greater size, than this necessary. Moreover sometimes difference can be in reek that will finally tell on capacity.
- Reiterative given long to enter and in a complicated way analyse moreover usually else and are rammed different variants one and same indications: shortened, full, with gap at the beginning initially, at the end (Avt. The Covering, Avtopokryshka) - depending on fantasies of the users. At request and group such importance will be considered as independent, and line, containing him(it), will not fall into necessary group or simply will not be âûâåäåíà on screen.
The Simplest way to avoid the similar problems remove reiterative importances in separate tables (that is to say create the reference books of the indications) and in the main table to insert the code a writing the reference book. Then their (the code writing the reference book and code of the indication in the main table) by correlation one to many (one record in reference book and much corresponding to her record in the main table). Hereunder in database will only be one variant of the indication and is kept he will be in one place in reference book. But as a matter of convenience entering the codes of the indications usually do the field with list, where inserted code do the unencountered user, but instead of he shows in list corresponding to code indication that creates the illusion of the entering the indication in field though indeed there gets his(its) code.
The Code record this her(its) unique identifier in table. Often his(its) name the key a record. The Keys be internal (strictly unique identifier record itself in table) and external (for relationship with the other table) moreover in âòîðîì event internal key main tables must coincide on type with external key of the bounded table: text text, number number.
As key possible to take for instance NAME employee (for table tab_Sotrudnik ), but only if and when in BD will not be a namesake. Otherwise íàäåæíåå to use the more unique identifier, for instance time number, but else íàäåæíåå to carry in table so-called ersatz key usually this field with type given counter . This is a numeric field, which automatically generates importance when making new record in table