SQL School

First Normal Form (1NF)

First Normal Form (1NF)
A database table is said to be in 1NF if it contains no repeating fields/columns.

• Make a separate table for each set of related attributes and give each table a primary key. In simple words we can say it as
• There are no repeating or duplicate fields.
• Each cell contains only a single value.
• Each record is unique and identified by primary key

Example:

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

This table is not in first normal form because:

• A. There are multiple fields in color lab.

• B. Records are repeating (Duplicate records) or no primary key. First Normal Form (1NF)

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

This table is now in first normal form.

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 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 DBA LIVE Online Training with Real-time Project

SQL DBA LIVE Online Training with Real-time Project

All Training sessions are completely practical, real-time.

One Real-time Project included in the course.

Free demo today @ June 16th 7 PM India Time.

Register Now.

 

Microsoft SQL Server Training from 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)

 

 

SQL DBA LIVE Online Training with Real-time Project

 

One Real-time Project included in the course.

Free demo today @ June 16th 7 PM India Time.

Register Now.

 

SQL DBA LIVE Online Training with Real-time Project

 

http://sqlschool.com/Register.html

Register today for free demo!!

Call us on +91 9666440801 (INDIA)
Call us on +1 (510) 400-4845 (USA/CANADA)

Mail us on contact@sqlschool.com
Website: http://www.sqlschool.com

SQL Server T-SQL & SQL DBA Training cum Certification

Please register for SQL Server / T-SQL & SQL DBA Free Demo onApr 13, 2016 11:00 AM IST at:

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

Why Choose Us?

** Instructor Led LIVE Online Training
** Completely Practical and Real-time
** Advance Theory Material
** Weekly Revision Classes
** Highly Interactive and Real-time

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

SQL School Training School

SQL School Trainers – Online

Register at htttp://www.sqlschool.com/Register.html

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

Call us on +91 9666440801 (INDIA)
Call us on +1 (510) 400-4845 (USA/CANADA)

Mail us on contact@sqlschool.com
Website: http://www.sqlschool.com

How to Install Microsoft SQL Server?

How to Install Microsoft SQL Server?

<iframe width=”420″ height=”315″ src=”https://www.youtube.com/embed/ivsqcGjOrf8″ frameborder=”0″ allowfullscreen></iframe>

How to Install Microsoft SQL Server?

 

SQL Server Installation – Step By Step Guide with download Link:

Please download SQL Server 2012 and SQL Server 2014 from the below link:

http://sqlschool.com/courses/info/
Please download SQL Server 2012 from the below link:

http://www.microsoft.com/en-in/download/details.aspx?id=35575
Please download SQL Server 2014 from the below link:

http://technet.microsoft.com/en-in/evalcenter/dn205290.aspx
ACTUAL INSTALLATION PROCESS TO BE DISCUSSED DURING SESSION 1 OF OUR SQL SERVER / T-SQL / SQL DBA / DB TESTING courses..

Register today for free demo @ http://sqlschool.com/register.html

Courses and Details @ http://sqlschool.com/courses.html

SQL School: Best Trainers for Microsoft SQL Server Technologies

SQL School: Best Trainers for Microsoft SQL Server Technologies

Choose SQL School (http://www.sqlschool.com) for LIVE Online, Classroom and Video Trainings.

SQL School: Best Trainers for Microsoft SQL Server Technologies

Best Trainers for Microsoft SQL Server Technologies

 

SQL School: Best Trainers for Microsoft SQL Server Technologies 

 

About SQL School Training Institute

SQL School (Regd: SequelGate Innovative Technologies Pvt. Ltd.) is strongly committed to provide complete real-time and practical training exclusively on Microsoft SQL Server and Datawarehousing technologies. SQL School Training Institute established in February, 2008 is now one of the best training institute offering SQL Server and T-SQL (SQL Server) Training, SQL Database Administration (SQL DBA) Training and Business Intelligence (MSBI / SQL BI) Training.

 

Training Highlights:

  • Highly Interactive, Practical
  • Certifications & Resumes
  • Placements & Job Support
  • THREE Realtime Case Studies
  • One Real-time Project
  • 24×7 LIVE Server with Lab

 

 

Continue reading

SQL Server / T-SQL & SQL DBA Free Demo

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

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

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.

Course Details @ http://sqlschool.com/SQLDBA-Online-Training.html

 

 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)