Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Vivek's SQL Notes

Vivek johari is currently a Analyst and have more that 5.5 yeras of experience in database. He has Master degree in Computer and also he is Microsoft certified Sql DBA (MCTS)& Microsoft certified SQl BI professional(MCTS). He is also Oracle certified profession(OCP)DBA in ORACLE 10g and ORACLE 9i.He has the experience of working in PL/SQL, T-SQL and SSIS/SSRS. His work basically involved designing and optimization of the Database.He has also published many database articles on his blog Technologies with Vivek Johari.

First Normal form (INF)

First Normal Form (INF):- A table is said to be in a First Normal Form (1NF)if it satisfy the following conditions:-
1)If the columns of the table only contain atomic values (Single, indivisible).
2)Primary key is defined for the table
3)All the columns of the table are defined on the primary key.

The first condition also implies that no column should contain the set of values. For example, suppose we have a table EmpDetails

Table Name :-EmpDetails
Primary Key:- EmpId

EmpId     EmpName              EmpRegdate         ExpertiseDomain
1                Raman                      23/04/2006              eLearning
2               Vivek Johari               02/01/2006           {Banking, financial, eLearning}

Now, in the above table the column ExpertiseDomain contains a set of values for the EmpId 2. Therefore this table is not in the 1NF form. To make this table in the 1NF, we need to break this table into two tables, one contains the employee information EmpInfo (EmpId, EmpName, and EmpRegdate) and the other table contains the employee expertisedomain information EmpexpertDomain (EmpId, ExpertiseDomain). In both the tables, EmpId will be the primary key.

Table Name:- EmpInfo
Primary Key:- EmpId

EmpId     EmpName            EmpRegdate
1               Raman                   23/04/2006
2               Vivek Johari           02/01/2006

Table Name:- EmpexpertDomain
Primary Key:- EmpId

EmpId           ExpertiseDomain
1                         eLearning
2                         Banking
2                         financial
2                         eLearning

Now these tables is said to be in the 1NF since all the columns of these tables contains the atomic values and all the values of the columns are dependent on the primary key EmpId.

Comments

No comments.

Leave a Comment

Please register or log in to leave a comment.