≡ Menu

Essential SQL

Want to Get Started Using SQL Server?

Databases Have Beautiful Structure

Now it is time to learn SQL in simple English.

  • Receive our free guide Getting Started with SQL Server!
  • Understand fundamental database concepts
  • Take your job to the next level.

Enter your email below to get our free guide to Getting Started with SQL Server.

Get Ready to Learn SQL in an Interview with Dennis Still

Big Data Chronogram

I recently got to know Dennis through twitter and essentaiSQL.com.  If you’re non-technical, you’ll find this interview inspiring.  You too can learn SQL.  If you’re a techie or IT pro, Dennis provides great comments and insights on SQL and data services; ways to better serve your customers.

Before we begin, I want to remind you all that if you have other questions you want answered, then post a comment or tweet me.  I’m here to help you.

With that let’s begin the interview!

[click to continue…]

0 comments
SQL Server Policy

Recently I had the opportunity to conduct a short interview with Boris Hristov.   I think you find this interview interesting as Boris reveals how he became a DBA and ultimately awarded a MVP designation.

Boris recently created a course to teach DBA’s Policy Based Management; click here to see the course (aff link).  By Using PBM, you can enforce facets such as naming conventions, configuration settings, or data file locations, for example.

PBM is a really valuable and time saving tool.  It’s value comes to light once you realize you’re managing hundreds of databases that developers are getting their hands into!

It provides an automated means to enforce standards across all the DB’s you manage.

Now that you know about one of Boris’ passions, let’s begin the interview.

[click to continue…]

0 comments
TiledPatternInHalf

Note:  This is the second in a series of articles covering joins.

The series starts with the article Introduction to Database Joins.  All the examples for this lesson are based on Microsoft SQL Server Management Studio and the AdventureWorks2012 database.  You can get started using these free tools using my Guide Getting Started Using SQL Server. In this article we are going to cover inner joins.

An inner join is used when you need to match rows from two tables.  Rows that match remain in the result, those that don’t are rejected. The match condition is commonly called the join condition.  When the match conditions involve equality, that is matching exactly the contents of one column to another, the join is called an equijoin.  You’ll find that most of the joins you’ll use are equijoins.  A common situation is where you need to join the primary key of one table to the foreign key of another.  This is needed when you are denormalizing data.

[click to continue…]

0 comments
Tiling_by_Patterns_stock

Introduction

One of the biggest issues beginning SQL writers have is being able to write queries that use more than one table.  In this series of articles we are going to show you how to write a query that combines, or joins, data from more than one table. Once you have gone through the examples you will understand how to write the basic commands to make this happen and why data is separated in the first place.

This first article introduces the concept of joining tables.  The focus is going to be more on the type of joins, not necessarily their syntax.  The later articles focus on the various types of joins.  Through the narrative and examples you’ll become very comfortable with each one.

In my prior articles you learned about the need to normalize to make it easier to maintain the data.  Though this makes it easier to maintain and update the data, it makes it very inconvenient to view and report information.  Typically the information you need to see has to be cross referenced across several tables for you to see the full picture. [click to continue…]

3 comments
Second Normal Form

This is the fourth in a series of posts teaching normalization.

The third post focused on the second normal form, its definition, and examples to hammer it home.

Once a table is in second normal form, we are guaranteed that every column is dependent on the primary key, or as I like to say, the table serves a single purpose.  But what about relationships among the columns?  Could there be dependencies between columns that could cause an inconsistency?

A table containing both columns for an employee’s age and birth date is spelling trouble, there lurks an opportunity for a data inconsistency!

How are these addressed?  By the third normal form. [click to continue…]

0 comments