SQL Server Training Center

Second Normal Form(2nd) (Eliminating Redundant Data)

A relation is in second normal form if it is in 1NF and every non key attribute is fully functionally dependent on the primary key.

It is in first normal form
All non-key attributes are fully functional dependent on the primary key

The First Normal form deals with the atomicity whereas the Second Normal Form deals with the relationship between the composite key columns and non-key columns.

To achieve the next progressive level your table should satisfy the requirement of First Normal Form then move towards the Second Normal Form.

 Let see the example from above 1st Normal From

ITEM COLORS PRICES TAX
Pen Red 3.0 0.40
Pen Blue 3.0 0.40
Scale Red 3.0 0.40
Scale Yellow 3.0 0.40
Bag Blue 120.0 12.52
Bag Black 120.0 12.52

Table is not in Second Normal Form because the price and tax depends on the item, but not color.

ITEM COLORS
Pen Red
Pen Blue
Scale Red
Scale Yellow
Bag Blue
Bag Black

 

ITEM PRICE TAX
Pen 3.0 0.40
Scale 3.0 0.40
Bag 120.0 12.52

 

What is Normalization? 

What is Normalization? 

Normalization is a database design technique which organizes tables in a manner that reduces redundancy and dependency of data.

It divides larger tables to smaller tables and link them using relationships.

In this tutorial, you will learn-

The inventor of the relational model Edgar Codd proposed the theory of normalization with the introduction of First Normal Form and he continued to extend theory with Second and Third Normal Form. Later he joined with Raymond F. Boyce  to develop the theory of Boyce-Codd Normal Form.

Theory of Data Normalization in Sql is still being developed further. For example there are discussions even on 6th Normal Form. But in most practical applications normalization achieves its best in 3rd Normal Form. The evolution of Normalization theories is illustrated below

1st Normal Form >> 2nd Normal Form >> 3rd Normal Form >>4th Normal Form >>  5th Normal Form >>6th Normal Form

Database Normalization Examples –

Assume a video library maintains a database of movies rented out. Without any normalization all information is stored in one table as shown below.

Further We shall discuss on different normal forms in detailed:

 

 

 

 

 

 

How to use INNER JOIN in SQL Server?

The most frequently used and important of the joins is the INNER JOIN. They are also referred to as an EQUIJOIN.

The INNER JOIN creates a new result table by combining column values of two tables (table1 and table2) based upon the join-predicate. The query compares each row of table1 with each row of table2 to find all pairs of rows which satisfy the join-predicate. When the join-predicate is satisfied, column values for each matched pair of rows of A and B are combined into a result row.

Syntax: The basic syntax of INNER JOIN is as follows:

SELECT table1.column1, table2.column2…
FROM table1
INNER JOIN table2
ON table1.common_field = table2.common_field;

Image Representation:

The INNER JOIN in SQL joins two tables according to the matching of a certain criteria using a comparison operator.

Sample Two Table Data:

FOODS:

 ITEM_ID ITEM_NAME ITEM_UNIT COMPANY_ID
1 Bread PCS 25
2 Sliced Bread PCS 16
3 Roasted Bread PCS 32
4 Garlic Bread PCS 48
5 Cheese Bread PCS 18
6 Fruit Bread PCS 22
7 Milk Bread PCS 28

Company:

COMPANY_ID COMPANY_NAME COMPANY_CITY
25 SUBWAY IRLAND
16 BURGER KING UNITED STATES
32 KFC UK
18 ROLLZONE AUSTRALIA
28 DOMINOS INDIA

Example

Here is an example of inner join in SQL between two tables.

To join item name, item unit columns from foods table and company name, company city columns from company table, with the following condition –

1. company_id of foods and company_id company table must be same, the following SQL statement can be used :

SELECT foods.item_name,foods.item_unit,
company.company_name,company.company_city
FROM foods
INNER JOIN company
ON foods.company_id =company.company_id;

Example of SQL INNER JOIN using JOIN keyword

To get item name, item unit columns from foods table and company name, company city columns from company table, after joining these mentioned tables, with the following condition –

1. company id of foods and company id of company table must be same,

the following SQL statement can be used :
SELECT foods.item_name,foods.item_unit,
company.company_name,company.company_city
FROM foods
JOIN company
ON foods.company_id =company.company_id;

SQL DBA Training – LIVE Online Training

SQL DBA Training with Real-time Project, Job Support

SQL DBA Online Training (LIVE, Instructor-Led)
Real-time Practical SQL DBA LIVE Online Training designed to work with all major SQL Database Administration activities including DB Design, Normalized Views, Stored Procedures, Indexes, Joins, DB Maintenance, Query Tuning, HA/DR, AAG and SQL Cluster Issues. Study Material, 24×7 Online Lab, Certification, Job Support with One Real-time Project included in the course. Versions: SQL Server 2012, SQL Server 2014 & 2016.

Register Today
contact@sqlschool.com
+91-9666440801 (India)
+91-9542916779 (India)
+91-(0)40 64577244 (India)
+1-510-400-4845 (USA/Canada)

Trainer Profile, Duration, Pricing

Trainer: Mr Sai Phanindra T (9+ Yrs Exp, MS FTE)

Duration: 7 Weeks (Mon – Fri/Sat). Installment Pay.

Total Course Fee: INR 18000/- ~ USD 300

Register Today
contact@sqlschool.com
+91-9666440801 (India)
+91-9542916779 (India)
+91-(0)40 64577244 (India)
+1-510-400-4845 (USA/Canada)

SQL DBA Online Training – Highlights
Completely Practical and Real-time
Suitable for Starters + Working Professionals
Session wise Handouts and Tasks + Solutions
TWO Real-time Case Studies, One Project
Certification & Interview Guidance
Detailed SQL Server Architecture, DB Design
Query Tuning, Stored Procedures, Linked Servers
In-Memory, DAC and Contained Databases
Routine DBA Activities, Emergency DBA Activites
High Availability, Disaster Recovery, Always-On

More Details and Free demo registration @ http://sqlschool.com/SQLDBA-Online-Training.html

SQL Server & SQL DBA Training From SQL School

SQL Server & SQL DBA Training From SQL School

 

Why Choose SQL School?

  • Microsoft Partner (ID# 4338151)

  • ISO Certified Training Organization

  • Dedicated to SQL Server Technologies

 

Training Highlights

  • Completely Practical and Realtime
  • Highly Interactive and interesting
  • Daily Tasks and Weekly Assignments
  • Certification Guidance and FAQs
  • 24×7 Server Access with Realtime DBs
  • Certification Oriented Trainings

SQL Server & SQL DBA Training From SQL School

Microsoft SQL Server Training from SQL School

SQL DBA Online Training
Mail: contact@sqlschool.com
Skype: SQL School
Address/Map
USA: +1 (510) 400 – 4845
India: +91 (040) 64577244 / 66343536 (Off)
India: +91 09666440801 (Mob)

 

Website: www.sqlschool.com

Mail: contact@sqlschool.com

 

Register Today for free demo.

http://sqlschool.com/register.html

SQL School is rated the BEST Training Center for SQL Server and MSBI

https://www.google.co.in/?gfe_rd=cr&ei=OnhhVZfHG6_v8wequYHAAQ&gws_rd=ssl#q=sql+school

https://www.google.co.in/?gfe_rd=cr&ei=OnhhVZfHG6_v8wequYHAAQ&gws_rd=ssl#q=sql+school

 

SQL School Training Institute (www.sqlschool) offers you complete practical real-time trainings.

Courses Offered:
1. SQL Server Developer Course (http://sqlschool.com/TSQL-Online-Training.html)
2. SQL DBA Course (http://sqlschool.com/SQLDBA-Online-Training.html)
3. MSBI Course (http://sqlschool.com/MSBI-Online-Training.html)
4. SSIS Course (http://sqlschool.com/SSIS-Online-Training.html)
5. SSAS Course (http://sqlschool.com/SSAS-Online-Training.html)
6. SSRS Course (http://sqlschool.com/SSRS-Online-Training.html)

To register for free demo:
http://sqlschool.com/contact.html

Call Us:
Mail: contact@sqlschool.com
Skype: SQL School
USA (001): (510) 400 – 4845
India (0091): 9666440801

SQL DBA LIVE Online Training: Free Demo

SQL DBA LIVE Online Training

Please register for SQL Server / T-SQL & SQL DBA Free Demo on Mar 27, 2015 6:15 AM IST at:

https://attendee.gotowebinar.com/register/3801357308688063490

Completely Real-time and Practical.
Theory Material in Advance.
Trainer Profile @ https://www.linkedin.com/in/saiphanindra

After registering, you will receive a confirmation email containing information about joining the webinar.

SQL DBA LIVE Online Training

 

Mail: contact@sqlschool.com

Skype: SQL School

Address/Map

 USA: +1 (510) 400 – 4845

India: +91 (040) 64577244 / 66343536 (Off)
India: +91 09666440801 (Mob)

 

 Mail: contact@sqlschool.com Skype: SQL School Address/Map USA: +1 (510) 400 - 4845 India: +91 (040) 64577244 / 66343536 (Off) India: +91 09666440801 (Mob)


Mail: contact@sqlschool.com
Skype: SQL School
Address/Map
USA: +1 (510) 400 – 4845
India: +91 (040) 64577244 / 66343536 (Off)
India: +91 09666440801 (Mob)

SQL Server (T-SQL) and SQL Server DBA

Free Demo on : SQL Server (T-SQL) and SQL Server DBA

To Register Click Here

https://global.gotowebinar.com/manageWebinar.tmpl?webinar=581977366357493506

For Course Details and Curriculum please refer:
http://sqlschool.com/TSQL-Online-Training.html

and

http://sqlschool.com/SQLDBA-Online-Training.html

Check for Other Courses offered at SQL School:

http://sqlschool.com/courses.html

 

www.sqlschool.com

www.sqlschool.com

 

To Register Click Here

 

SQL School

Mail: contact@sqlschool.com

Skype: SQL School

Address/Map

 USA: +1 (510) 400 – 4845

India: +91 (040) 64577244 / 66343536 (Off)
India: +91 09666440801 (Mob)