0% found this document useful (0 votes)
27 views26 pages

Chapter 1

The document is an introduction to SQL and databases, outlining course goals such as understanding database structure and extracting information using SQL. It covers key concepts including tables, rows, columns, relational databases, and data types. Additionally, it emphasizes best practices for naming tables and fields, as well as the importance of unique identifiers.

Uploaded by

Elicia Luna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views26 pages

Chapter 1

The document is an introduction to SQL and databases, outlining course goals such as understanding database structure and extracting information using SQL. It covers key concepts including tables, rows, columns, relational databases, and data types. Additionally, it emphasizes best practices for naming tables and fields, as well as the importance of unique identifiers.

Uploaded by

Elicia Luna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Databases

INTRODUCTION TO SQL

Jasmin Ludolf
Senior Data Science Content Developer,
DataCamp
Course goals
1. Understand databases and their structure → Chapter 1
2. Extract information from databases using SQL → Chapter 2

INTRODUCTION TO SQL
Structured Query Language (SQL)
SQL communicates with databases

INTRODUCTION TO SQL
Introducing databases

INTRODUCTION TO SQL
A closer look at tables

INTRODUCTION TO SQL
Rows and columns

Individual data
Specific part of data

INTRODUCTION TO SQL
Relational databases
Define relationships between tables of data inside the database

INTRODUCTION TO SQL
Database advantages

INTRODUCTION TO SQL
Let's practice!
INTRODUCTION TO SQL
Tables
INTRODUCTION TO SQL

Jasmin Ludolf
Senior Data Science Content Developer,
DataCamp
Table naming

Table names:

Clear

Refer the data it contains(plural)

Lowercase

Use underscores—no spaces

INTRODUCTION TO SQL
Records and fields
Table rows are records
Table columns are fields

INTRODUCTION TO SQL
Records
A specific data observation

INTRODUCTION TO SQL
Fields

One piece of a record

INTRODUCTION TO SQL
Field naming

Field names:

Lowercase

Use underscores—no spaces

Singular

Different from the table name

INTRODUCTION TO SQL
Unique identifiers
Keys identify unique records

INTRODUCTION TO SQL
Multiple tables

INTRODUCTION TO SQL
Let's practice!
INTRODUCTION TO SQL
Data
INTRODUCTION TO SQL

Jasmin Ludolf
Senior Data Science Content Developer,
DataCamp
Database storage

INTRODUCTION TO SQL
SQL data types

Different types of data are stored differently and take up different space

Some operations only apply to certain data types

INTRODUCTION TO SQL
Strings

A string is a sequence of characters such as letters or punctuation

VARCHAR is a flexible and popular string data type in SQL

INTRODUCTION TO SQL
Integers

Integers store whole numbers

INT is a flexible and popular integer data type in SQL

INTRODUCTION TO SQL
Floats

Floats store numbers that include a fractional part


NUMERIC is a flexible and popular float data type in SQL

INTRODUCTION TO SQL
Schemas

INTRODUCTION TO SQL
Let's practice!
INTRODUCTION TO SQL

You might also like