Decomposing a relation into BCNF

Although the question is old, the other questions/answers don’t seem to provide a very clear step-by-step general answer on determining and decomposing relations to BCNF. 1. Determine BCNF: For relation R to be in BCNF, all the functional dependencies (FDs) that hold in R need to satisfy property that the determinants X are all superkeys … Read more

Should I normalize my DB or not?

A philosophical answer: Sub-optimal (relational) databases are rife with insert, update, and delete anomalies. These all lead to inconsistent data, resulting in poor data quality. If you can’t trust the accuracy of your data, what good is it? Ask yourself this: Do you want the right answers slower or do you want the wrong answers … Read more

Normalization in MYSQL

I try to attempt to explain normalization in layman terms here. First off, it is something that applies to relational database (Oracle, Access, MySQL) so it is not only for MySQL. Normalisation is about making sure each table has the only minimal fields and to get rid of dependencies. Imagine you have an employee record, … Read more

In terms of databases, is “Normalize for correctness, denormalize for performance” a right mantra?

The two most common reasons to denormalize are: Performance Ignorance The former should be verified with profiling, while the latter should be corrected with a rolled-up newspaper 😉 I would say a better mantra would be “normalize for correctness, denormalize for speed – and only when necessary”

What is the best way to implement Polymorphic Association in SQL Server?

Another common Name for this model is the Supertype Model, where one has a base set of attributes that can be expanded via joining to another entity. In Oracle books, it is taught both as a logical model and physical implementation. The model without the relations would allow data to grow into invalid state and … Read more