18 Kasım 2020 Çarşamba

Veri Tabanında Normalization Nedir

Giriş
Bazı notlar şöyle

Normalization Nedir?
Açıklaması şöyle. Verinin birden fazla tabloya dağıtılması anlamına gelir.
Normalization - normalizing means storing data into multiple collections with references between them. The data is defined once, making the writing tasks (update) easy. When it comes to reading tasks, normalization has its downsides. If you want to receive data from multiple collections, you have to perform multiple queries making the reads slower.
Denormalization Nedir?
Açıklaması şöyle. Verinin tek tabloda saklanması anlamına gelir. Denormalization hız için gerekli olabilir ve tamamen kötü bir şey değildir.
Denormalization - this is storing multiple data embedded in a single document. It will perform better on reads but will be slower on writes. This way of storing data will also take up more space.
Materialized Views
Materialized Views yazısına taşıdım

Normalization Ne Zaman Kullanılır?
Sıkça güncellenen Collection için kullanılabilir. Açıklaması şöyle.
On the other hand, if your database has large documents with constant updates and you want good performance on writes, then you may want to consider normalization.
Normalization ve 1:N İlişki
One-to-few ilişkileri normalization  kullanılmayabilir.
One-to-many ilişkilerde duruma göre belki kullanılabilir, belki kullanılmaz.
One-to-squillion ilişkide mutlaka normalization yapmak gerekir.

Denormalization Ne Zaman Kullanılır?
Az güncellenen ve sık okunan Collection için kullanılabilir. Açıklaması şöyle.
On one hand, if you have a database that doesn’t need regular updates, has small documents that grow slowly in size, immediate consistency on the update is not very important, but you need a good performance on reads, then denormalization may be the smart choice.
Denormalization ve 1:N İlişki
One-to-few ilişkileri denormalize etmek kabul edilebilir.
One-to-many ilişkilerde durumuna göre belki kullanılabilir, belki kullanılmaz.
One-to-squillion ilişkide kabul edilemez.

Hiç yorum yok:

Yorum Gönder