Learn the fundamentals of Structured Query Language SQL! Even though it's over 40 years old, the world's most popular databases still run on SQL.

Foreign key basics https://docs.microsoft.com/en-us/sql/relational-databases/tables/create-foreign-key-relationships

#dev #database #100SecondsOfCode

Draw SQL Diagrams https://drawsql.app/

Install the quiz app 🤓

iOS https://itunes.apple.com/us/app/fireship/id1462592372?mt=8
Android https://play.google.com/store/apps/details?id=io.fireship.quizapp

Upgrade to Fireship PRO at https://fireship.io/pro
Use code lORhwXd2 for 25% off your first payment. 

My VS Code Theme

- Atom One Dark 
- vscode-icons
- Fira Code Font
2024-02-04T05:54:38.146Z
nova-2
2-general-nova
2024-01-09.29447
30089e05-99d1-4376-b32e-c263170674af
febd0406-44fa-4a66-86ef-54bb37cf88f1
f2da338c0518fdd8bd86c7f471bd261be80e31a796efd3b8e37dc12305c577f4
67875a7f-c9c4-48a0-aa55-5bdb8a91c34a
deprecated
Structured Query Language, SQL or SQL for short, is the gold standard language for communicating with relational database management systems.
You've likely heard of databases like MySQL, Postgres, Microsoft SQL Server, and Oracle, all of which are based on SQL with their own little variations.
It was initially developed in the early seventies to mutate and retrieve data from IBM's system r database.
By 1986, it was standardized into the syntax that remains extremely popular in technical applications today.
A relational database organizes data into tables, kind of like an Excel spreadsheet where columns contain attributes or types of data, while each row represents an individual record or data point with its own unique ID known as a primary key.
We can establish such relationships between data points by taking the unique ID from 1 row and storing it on a different row in a different table in a special column known as a foreign key.
In the teams table, the team ID is the primary key, but in the players table, it's the foreign key.
And what that data structure tells us is that a player belongs to on team while a team can have many players.
What we've done here is structured our data in its smallest normal form to eliminate duplication and redundancy.
Now the role of SQL is not only to read, create, update, and delete data, but also to join data together based on the relationships embedded within it.
The syntax is comprised of several key parts.
If we zoom all the way out, we have a statement or a piece of code that does something, like reads or writes to the database.
Space.
Within a statement, we have a variety of keywords that can manipulate the database.
Select can be used to make a query for the columns that you want from a table.
The column and table names are known as identifiers, but we may not want every row in the table.
So we filter the results with the where keyword to only include records that meet a certain condition.
It's like looping over every row in the table and only returning rows in the query where the predicate evaluates to true.
Then, we might use the join keyword to connect data from an entirely different table by matching the primary key on this table to the foreign key on another table.
Sizzle.
What we've created is a collection of clauses that make up a full SQL statement.
We can now go and execute this code on the hundreds of different databases that support SQL.
This has been structured query language in 100 seconds.
Like and subscribe if you wanna see a full SQL tutorial.
Thanks for watching, and I will see you in the next one.

Speaker 0: Structured Query Language, SQL or SQL for short, is the gold standard language for communicating with relational database management systems. You've likely heard of databases like MySQL, Postgres, Microsoft SQL Server, and Oracle, all of which are based on SQL with their own little variations. It was initially developed in the early seventies to mutate and retrieve data from IBM's system r database. By 1986, it was standardized into the syntax that remains extremely popular in technical applications today. A relational database organizes data into tables, kind of like an Excel spreadsheet where columns contain attributes or types of data, while each row represents an individual record or data point with its own unique ID known as a primary key.

We can establish such relationships between data points by taking the unique ID from 1 row and storing it on a different row in a different table in a special column known as a foreign key. In the teams table, the team ID is the primary key, but in the players table, it's the foreign key. And what that data structure tells us is that a player belongs to on team while a team can have many players. What we've done here is structured our data in its smallest normal form to eliminate duplication and redundancy. Now the role of SQL is not only to read, create, update, and delete data, but also to join data together based on the relationships embedded within it.

The syntax is comprised of several key parts. If we zoom all the way out, we have a statement or a piece of code that does something, like reads or writes to the database. Space. Within a statement, we have a variety of keywords that can manipulate the database. Select can be used to make a query for the columns that you want from a table.

The column and table names are known as identifiers, but we may not want every row in the table. So we filter the results with the where keyword to only include records that meet a certain condition. It's like looping over every row in the table and only returning rows in the query where the predicate evaluates to true. Then, we might use the join keyword to connect data from an entirely different table by matching the primary key on this table to the foreign key on another table. Sizzle.

What we've created is a collection of clauses that make up a full SQL statement. We can now go and execute this code on the hundreds of different databases that support SQL. This has been structured query language in 100 seconds. Like and subscribe if you wanna see a full SQL tutorial. Thanks for watching, and I will see you in the next one.
Structured Query Language, SQL or SQL for short, is the gold standard language for communicating with relational database management systems. You've likely heard of databases like MySQL, Postgres, Microsoft SQL Server, and Oracle, all of which are based on SQL with their own little variations. It was initially developed in the early seventies to mutate and retrieve data from IBM's system r database. By 1986, it was standardized into the syntax that remains extremely popular in technical applications today. A relational database organizes data into tables, kind of like an Excel spreadsheet where columns contain attributes or types of data, while each row represents an individual record or data point with its own unique ID known as a primary key. We can establish such relationships between data points by taking the unique ID from 1 row and storing it on a different row in a different table in a special column known as a foreign key. In the teams table, the team ID is the primary key, but in the players table, it's the foreign key. And what that data structure tells us is that a player belongs to on team while a team can have many players. What we've done here is structured our data in its smallest normal form to eliminate duplication and redundancy. Now the role of SQL is not only to read, create, update, and delete data, but also to join data together based on the relationships embedded within it. The syntax is comprised of several key parts. If we zoom all the way out, we have a statement or a piece of code that does something, like reads or writes to the database. Space. Within a statement, we have a variety of keywords that can manipulate the database. Select can be used to make a query for the columns that you want from a table. The column and table names are known as identifiers, but we may not want every row in the table. So we filter the results with the where keyword to only include records that meet a certain condition. It's like looping over every row in the table and only returning rows in the query where the predicate evaluates to true.
databases
data
data management
sports
languages
data analysis
Then, we might use the join keyword to connect data from an entirely different table by matching the primary key on this table to the foreign key on another table. Sizzle. What we've created is a collection of clauses that make up a full SQL statement. We can now go and execute this code on the hundreds of different databases that support SQL.
This has been structured query language in 100 seconds. Like and subscribe if you wanna see a full SQL tutorial. Thanks for watching, and I will see you in the next one.
databases
programming
data management
Structured Query Language, SQL or SQL for short, is the gold standard language for communicating with relational database management systems. You've likely heard of databases like MySQL, Postgres, Microsoft SQL Server, and Oracle, all of which are based on SQL with their own little variations. It was initially developed in the early seventies to mutate and retrieve data from IBM's system r database. By 1986, it was standardized into the syntax that remains extremely popular in technical applications today. A relational database organizes data into tables, kind of like an Excel spreadsheet where columns contain attributes or types of data, while each row represents an individual record or data point with its own unique ID known as a primary key. We can establish such relationships between data points by taking the unique ID from 1 row and storing it on a different row in a different table in a special column known as a foreign key. In the teams table, the team ID is the primary key, but in the players table, it's the foreign key. And what that data structure tells us is that a player belongs to on team while a team can have many players. What we've done here is structured our data in its smallest normal form to eliminate duplication and redundancy. Now the role of SQL is not only to read, create, update, and delete data, but also to join data together based on the relationships embedded within it. The syntax is comprised of several key parts. If we zoom all the way out, we have a statement or a piece of code that does something, like reads or writes to the database. Space. Within a statement, we have a variety of keywords that can manipulate the database. Select can be used to make a query for the columns that you want from a table. The column and table names are known as identifiers, but we may not want every row in the table. So we filter the results with the where keyword to only include records that meet a certain condition. It's like looping over every row in the table and only returning rows in the query where the predicate evaluates to true. Then, we might use the join keyword to connect data from an entirely different table by matching the primary key on this table to the foreign key on another table. Sizzle. What we've created is a collection of clauses that make up a full SQL statement. We can now go and execute this code on the hundreds of different databases that support SQL. This has been structured query language in 100 seconds. Like and subscribe if you wanna see a full SQL tutorial. Thanks for watching, and I will see you in the next one.
Structured
structured
Query
query
Language,
language
SQL
sql
or
or
SQL
sql
for
for
short,
short
is
is
the
the
gold
gold
standard
standard
language
language
for
for
communicating
communicating
with
with
relational
relational
database
database
management
management
systems.
systems
You've
you've
likely
likely
heard
heard
of
of
databases
databases
like
like
MySQL,
mysql
Postgres,
postgres
Microsoft
microsoft
SQL
sql
Server,
server
and
and
Oracle,
oracle
all
all
of
of
which
which
are
are
based
based
on
on
SQL
sql
with
with
their
their
own
own
little
little
variations.
variations
It
it
was
was
initially
initially
developed
developed
in
in
the
the
early
early
seventies
seventies
to
to
mutate
mutate
and
and
retrieve
retrieve
data
data
from
from
IBM's
ibm's
system
system
r
r
database.
database
By
by
1986,
1986
it
it
was
was
standardized
standardized
into
into
the
the
syntax
syntax
that
that
remains
remains
extremely
extremely
popular
popular
in
in
technical
technical
applications
applications
today.
today
A
a
relational
relational
database
database
organizes
organizes
data
data
into
into
tables,
tables
kind
kind
of
of
like
like
an
an
Excel
excel
spreadsheet
spreadsheet
where
where
columns
columns
contain
contain
attributes
attributes
or
or
types
types
of
of
data,
data
while
while
each
each
row
row
represents
represents
an
an
individual
individual
record
record
or
or
data
data
point
point
with
with
its
its
own
own
unique
unique
ID
id
known
known
as
as
a
a
primary
primary
key.
key
We
we
can
can
establish
establish
such
such
relationships
relationships
between
between
data
data
points
points
by
by
taking
taking
the
the
unique
unique
ID
id
from
from
1
1
row
row
and
and
storing
storing
it
it
on
on
a
a
different
different
row
row
in
in
a
a
different
different
table
table
in
in
a
a
special
special
column
column
known
known
as
as
a
a
foreign
foreign
key.
key
In
in
the
the
teams
teams
table,
table
the
the
team
team
ID
id
is
is
the
the
primary
primary
key,
key
but
but
in
in
the
the
players
players
table,
table
it's
it's
the
the
foreign
foreign
key.
key
And
and
what
what
that
that
data
data
structure
structure
tells
tells
us
us
is
is
that
that
a
a
player
player
belongs
belongs
to
to
on
on
team
team
while
while
a
a
team
team
can
can
have
have
many
many
players.
players
What
what
we've
we've
done
done
here
here
is
is
structured
structured
our
our
data
data
in
in
its
its
smallest
smallest
normal
normal
form
form
to
to
eliminate
eliminate
duplication
duplication
and
and
redundancy.
redundancy
Now
now
the
the
role
role
of
of
SQL
sql
is
is
not
not
only
only
to
to
read,
read
create,
create
update,
update
and
and
delete
delete
data,
data
but
but
also
also
to
to
join
join
data
data
together
together
based
based
on
on
the
the
relationships
relationships
embedded
embedded
within
within
it.
it
The
the
syntax
syntax
is
is
comprised
comprised
of
of
several
several
key
key
parts.
parts
If
if
we
we
zoom
zoom
all
all
the
the
way
way
out,
out
we
we
have
have
a
a
statement
statement
or
or
a
a
piece
piece
of
of
code
code
that
that
does
does
something,
something
like
like
reads
reads
or
or
writes
writes
to
to
the
the
database.
database
Space.
space
Within
within
a
a
statement,
statement
we
we
have
have
a
a
variety
variety
of
of
keywords
keywords
that
that
can
can
manipulate
manipulate
the
the
database.
database
Select
select
can
can
be
be
used
used
to
to
make
make
a
a
query
query
for
for
the
the
columns
columns
that
that
you
you
want
want
from
from
a
a
table.
table
The
the
column
column
and
and
table
table
names
names
are
are
known
known
as
as
identifiers,
identifiers
but
but
we
we
may
may
not
not
want
want
every
every
row
row
in
in
the
the
table.
table
So
so
we
we
filter
filter
the
the
results
results
with
with
the
the
where
where
keyword
keyword
to
to
only
only
include
include
records
records
that
that
meet
meet
a
a
certain
certain
condition.
condition
It's
it's
like
like
looping
looping
over
over
every
every
row
row
in
in
the
the
table
table
and
and
only
only
returning
returning
rows
rows
in
in
the
the
query
query
where
where
the
the
predicate
predicate
evaluates
evaluates
to
to
true.
true
Then,
then
we
we
might
might
use
use
the
the
join
join
keyword
keyword
to
to
connect
connect
data
data
from
from
an
an
entirely
entirely
different
different
table
table
by
by
matching
matching
the
the
primary
primary
key
key
on
on
this
this
table
table
to
to
the
the
foreign
foreign
key
key
on
on
another
another
table.
table
Sizzle.
sizzle
What
what
we've
we've
created
created
is
is
a
a
collection
collection
of
of
clauses
clauses
that
that
make
make
up
up
a
a
full
full
SQL
sql
statement.
statement
We
we
can
can
now
now
go
go
and
and
execute
execute
this
this
code
code
on
on
the
the
hundreds
hundreds
of
of
different
different
databases
databases
that
that
support
support
SQL.
sql
This
this
has
has
been
been
structured
structured
query
query
language
language
in
in
100
100
seconds.
seconds
Like
like
and
and
subscribe
subscribe
if
if
you
you
wanna
wanna
see
see
a
a
full
full
SQL
sql
tutorial.
tutorial
Thanks
thanks
for
for
watching,
watching
and
and
I
i
will
will
see
see
you
you
in
in
the
the
next
next
one.
one
success
The speaker explains that databases like MySQL, Postgres, and Oracle are the gold standards for communication with relational database management systems. A thirteen-year old explains that SQL is used to create a database and eliminate redundancy and duplication, and that it is structured query language that allows for efficient execution of SQL on multiple databases. The speaker also mentions that the code is structured in a flow state and allows for joint execution of queries.
SQL Explained in 100 Seconds
Structured Query Language, SQL or SQL for short, is the gold standard language for communicating with relational database management systems. You've likely heard of databases like MySQL, Postgres, Microsoft SQL Server, and Oracle, all of which are based on SQL with their own little variations. It was initially developed in the early seventies to mutate and retrieve data from IBM's system r database. By 1986, it was standardized into the syntax that remains extremely popular in technical applications today. A relational database organizes data into tables, kind of like an Excel spreadsheet where columns contain attributes or types of data, while each row represents an individual record or data point with its own unique ID known as a primary key. We can establish such relationships between data points by taking the unique ID from 1 row and storing it on a different row in a different table in a special column known as a foreign key. In the teams table, the team ID is the primary key, but in the players table, it's the foreign key. And what that data structure tells us is that a player belongs to on team while a team can have many players. What we've done here is structured our data in its smallest normal form to eliminate duplication and redundancy. Now the role of SQL is not only to read, create, update, and delete data, but also to join data together based on the relationships embedded within it. The syntax is comprised of several key parts. If we zoom all the way out, we have a statement or a piece of code that does something, like reads or writes to the database. Space. Within a statement, we have a variety of keywords that can manipulate the database. Select can be used to make a query for the columns that you want from a table. The column and table names are known as identifiers, but we may not want every row in the table. So we filter the results with the where keyword to only include records that meet a certain condition. It's like looping over every row in the table and only returning rows in the query where the predicate evaluates to true. Then, we might use the join keyword to connect data from an entirely different table by matching the primary key on this table to the foreign key on another table. Sizzle. What we've created is a collection of clauses that make up a full SQL statement. We can now go and execute this code on the hundreds of different databases that support SQL. This has been structured query language in 100 seconds. Like and subscribe if you wanna see a full SQL tutorial. Thanks for watching, and I will see you in the next one.
The speaker explains that databases like MySQL, Postgres, and Oracle are the gold standards for communication with relational database management systems. A thirteen-year old explains that SQL is used to create a database and eliminate redundancy and duplication, and that it is structured query language that allows for efficient execution of SQL on multiple databases. The speaker also mentions that the code is structured in a flow state and allows for joint execution of queries.