S
S
Sergey Sulakov2016-01-07 14:24:36
Database
Sergey Sulakov, 2016-01-07 14:24:36

Why normalize a MySQL database?

Why normalize a MySQL database?
Just for the sake of eliminating redundancy, data duplication?
But there is a bunch of additional tables and complex (JOIN-s) queries

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
avikb, 2016-01-08
@web-verzus-team

When developing a normalized or denormalized base, the size of the HDD plays the last role.
First of all, data normalization is needed to eliminate the mess and, as a result, simplify the system (reduce the number of system states), which leads to a significant reduction in errors.
By normalizing data, you shift some of the data validation logic to the DBMS, such as consistency and (partially) correctness. That is, already at the level of inserting / changing data, you cannot fail to fill in a mandatory field or change a field in one table, but forget (or change it incorrectly) in another (consistency), you cannot enter not a date in the date field, but into in an int field is not an int (correctness) and you cannot delete an entry if there are entries that refer to it (consistency).
The normalized state of the database is the ideal state of the database, denormalization should be done only if it is impossible to achieve the desired results without it (provided that you understand how the DBMS works, how data, indexes are selected, sorted and intersections are searched), if one is enough for your system server, then in 99% of cases you absolutely do not need data denormalization and are contraindicated.
Simply put - if you do not know why normalization is needed, then you definitely need it.

D
Dimonchik, 2016-01-07
@dimonchik2013

it’s dry here
it’s more interesting here 6-7th lecture
in a nutshell - there are no miracles, with JOIN memory is eaten only with JOIN, and without normalization -
the computer always has a bunch of tables - don’t care, it doesn’t see anything at all except zeros and ones

S
sivabur, 2016-01-07
@sivabur

You answered your own question.
There is also denormalization.
ps: what is google for you)

A
Alexander Melekhovets, 2016-01-07
@Blast

To avoid a mess in the data (anomalies), fraught with their loss or ambiguous interpretation. About normalization and the anomalies eliminated by each normal form, it is briefly and clearly written in the book SQL Antipatterns in Appendix A.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question