This sql tutorial for beginners will walk you through the basic concept of database normalization.
Pretty much everyone who knows databases has heard of normal forms, or database normalisation.
In the SQL database world, database normalization helps us organize our SQL databases so that we get rid of redundant data.
As far as database relationships go, there are four primary database normal forms.
These database normalization forms include the database normalization 1nf, the second database normal form, the database normalization 3nf, and the so-called Boyce-Codd Normal Form that removes functional dependencies.
The first database normal form ensures that each set of values in an attribute has relations as elements.
This sql tutorial will tell you that the second normal form eliminates redundant data by making each attribute without a key dependent on the primary key.
This sql tutorial for beginners will also tell you that the third normal form further refines the second one by requiring all attributes without a key to be independent of each other.
The Boyce-Codd database normal form builds upon the third normal form and requires that all columns without a key depend on a primary key.
The fourth database normal form is essentially the same as a Boyce-Codd normal form with an added requirement for a table to not contain any multi-valued dependencies.
These were the database normal forms that you may come across as part of sql interview questions and answers in your next database interview.
However, there also is fifth normal form refers to the highest level of database normalization.
For a database to be in the fifth normal form, it should consist of tables that are decomposed into smaller tables to remove data redundancy and improve data integrity.
One would think that this list defines all of the database normal forms that can be used, but that's not the case.
Not many people know, but there are other database normal forms, including the Elementary Key Normal Form (EKNF), Essential Tuple Normal Form (ETNF), Domain-Key Normal Form (DKNF), and the Sixth Database Normal Form (6NF).
The Elementary Key Normal Form is an enhancement on the third normal form and is relevant for certain types of functional dependencies in a database management system.
There is also an essential tuple normal form or ETNF, which is a stricter form of the fourth normal form, but less strict than the fifth normal form.
If we need to specify a database normal form that takes into account all of the possible dependencies and constraints, we use the domain-key normal form, or DKNF.
Finally, the goal of normal forms in terms of databases is to either reduce or completely eliminate the necessity of storing unnecessary data in a database management system.
Database normalization is not the last step in your database journey either - make sure to protect your database and your application from sql injection, the xss attack, and other attack vectors. Subscribe to this channel to learn them!
Subscribe to learn more about normal forms in database management systems too, and until next time.
Music:
Wilderness by Filo Starquez: / filo-starquez
Creative Commons - Attribution - NoDerivs 3.0 Unported - CC BY-ND 3.0
Free Download / Stream: tinyurl.com/yp...
Music promoted by Audio Library tinyurl.com/32...
#developer #database #sql #web #interview #data
Негізгі бет Database Normalization for Beginners - 1NF, 2NF, 3NF, BCNF, 4NF, 5NF, EKNF, ETNF & DKNF
Пікірлер