SQL for Data Analytics · Basics of Data

Basics of Data

Watch14 min

This video is about what data actually is, and why we organize it into tables.

Basics of Data14 min

Pause and answer

These are just for you. They aren't graded or turned in. Answer first, then open mine and compare.

What does SQL stand for, and why is this name significant in relation to the type of data it works with?

How I'd answer it

Structured Query Language. It's literally in the name: SQL works with structured data. That means tables, with clear rules about what each column holds and what a record has to have in order to be in the table.

That structure is what makes it possible to write one query and have it apply to every record the same way. A computer needs very specific rules to follow, and the structure gives it those rules.

How would you explain the concept of a table to someone who has never seen one before?

How I'd answer it

It's a way of organizing information about a bunch of the same kind of thing. Each row is a record for one particular thing, like one apple. Each column holds the same piece of information for every record, like the weight, always measured the same way.

So if you want to know something about one specific thing, you find its row, move across to the column you care about, and there's your answer. Usually there's also an ID column, so you can tell two records apart even when everything else about them looks the same.

The parts of a table

A table is the structure we'll be using all quarter. You've seen a million of them, but it's worth being precise about the parts, because every query you write is going to be in terms of them.

This is part of a real table from Northwind.

Click the table

EmployeeIDFirstNameLastNameBirthDate
1NancyDavolio1968-12-08
2AndrewFuller1952-02-19
3JanetLeverling1963-08-30
4MargaretPeacock1958-09-19
5StevenBuchanan1955-03-04

Every SQL query starts from a table and gives you back a table. Here's that same table, live. Run it, then change Employees to Products and run it again.

Run this to see the Employees table.
⌘/Ctrl + Enter