TIBCO Jaspersoft Official: Database Technology Database Technology
TIBCO Jaspersoft Official: Database Technology Database Technology
TIBCO Jaspersoft Official: Database Technology Database Technology
(http://www.studytonight.com/)
WRITE
Tutorials (http://studytonight.com/library/) Q & A Forum (http://studytonight.com/studyroom/) FOR US &
GET PAID!
DATABASE TECHNOLOGY
Tests (http://studytonight.com/tests/)
HTML Course (http://studytonight.com/code/) PRACTICE TESTS →
(/collaborate)
(/tests/?subject=dbms)
LogIn (http://www.studytonight.com/login) Suggest (http://www.studytonight.com/suggest)
Database Concept
Normalization of Database
Overview of DBMS (overview-of-
Database Normalisation is a technique of organizing the data in the database. Normalization is a systematic
dbms)
approach of decomposing tables to eliminate data redundancy and undesirable characteristics like Insertion,
Database Architecture Update and Deletion Anamolies. It is a multi-step process that puts data into tabular form by removing duplicated
(architecture-of-database) data from the relation tables.
DDL Command
Create query (create-query) Updation Anamoly : To update address of a student who occurs twice or more than twice in a table, we will
have to update S_Address column in all the rows, else data will become inconsistent.
Alter query (alter-query)
Insertion Anamoly : Suppose for a new admission, we have a Student id(S_id), name and address of a
Truncate, Drop and Rename
query (truncate-drop-rename- student but if student has not opted for any subjects yet then we have to insert NULL there, leading to
Deletion Anamoly : If (S_id) 401 has only one subject and temporarily he drops it, when we delete that row,
DML Command
entire student record will be deleted along with it.
All DML command (dml-
command)
http://www.studytonight.com/dbms/database-normalization.php Page 1 of 5
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight 2016-11-22, 2(49 PM
Group BY clause (groupby- The Primary key is usually a single column, but sometimes more than one column can be combined to create a
clause) single primary key. For example consider a table which is not in First normal form
Stuart 17 Maths
Using the First Normal Form, data redundancy increases, as there will be many columns with same data in
multiple rows but each row as a whole will be unique.
http://www.studytonight.com/dbms/database-normalization.php Page 2 of 5
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight 2016-11-22, 2(49 PM
In example of First Normal Form there are two rows for Adam, to include multiple subjects that he has opted for.
While this is searchable, and follows First normal form, it is an inefficient use of space. Also in the above Table in
First Normal Form, while the candidate key is {Student, Subject}, Age of Student only depends on Student
column, which is incorrect as per Second Normal Form. To achieve second normal form, it would be helpful to
split out the subjects into an independent table, and match them up using the student names as foreign keys.
Student Age
Adam 15
Alex 14
Stuart 17
In Student Table the candidate key will be Student column, because all other column i.e Age is dependent on it.
Student Subject
Adam Biology
Adam Maths
Alex Maths
Stuart Maths
In Subject Table the candidate key will be {Student, Subject} column. Now, both the above tables qualifies for
Second Normal Form and will never suffer from Update Anomalies. Although there are a few complex cases in
which table in Second Normal Form suffers Update Anomalies, and to handle those scenarios Third Normal
Form is there.
Student_Detail Table :
In this table Student_id is Primary key, but street, city and state depends upon Zip. The dependency between zip
and other fields is called transitive dependency. Hence to apply 3NF, we need to move the street, city and
state to new table, with Zip as primary key.
Address Table :
http://www.studytonight.com/dbms/database-normalization.php Page 3 of 5
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight 2016-11-22, 2(49 PM
http://www.studytonight.com/dbms/database-normalization.php Page 4 of 5
1NF, 2NF, 3NF and BCNF in Database Normalization | DBMS Tutorial | Studytonight 2016-11-22, 2(49 PM
http://www.studytonight.com/dbms/database-normalization.php Page 5 of 5