Afrikaans
Akan
Albanian
Amharic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
In this lesson, we're taking a look at SQL, or S-Q-L.
And SQL stands for Structured Query Language.
So why is this of interest to a database administrator?
Well, primarily because SQL is the language
of relational databases.
The purpose of SQL is to manipulate relational data.
So we have relational databases that
have tables and relationships between those tables,
and SQL is a specially-designed language
to operate with those tables.
When we talk about what is SQL?
It's important to classify a little bit
about what it is not.
So SQL is not a proprietary language
that is owned by any company.
When Oracle says that they're the caretaker of a language
like Java, that's different than their relationship
to SQL, because SQL is built on a standard
by the ANSI's standard organization.
So it's the American National Standards Institute.
And they come up with the standards for what
will be in the SQL language.
So no company-- no relational database company--
owns SQL.
It's also not to be confused with SQL Server.
SQL Server is a relational database product
from Microsoft.
People refer to it, often, as SQL,
and that can be very confusing.
SQL is a language.
It is a language to deal with relational databases.
We classify it as a fourth-generation language,
or 4GL.
So what do we mean by that?
A lot of the languages we think of when we consider the term
"programming language" fall into the category of a 3GL,
or third-generation language.
And those are languages like C and C++ and Java.
In using a 3GL, you have much more control and responsibility
for things like memory usage with variables.
Fourth-generation languages are meant to be easier to use.
They're supposed to be closer to natural language.
So most people would find that SQL is easier to learn than C
or C++.
SQL is classified into sublanguages,
and each one of those sublanguages kind of
covers a portion of the language syntax itself.
So we'll take a look at these.
The first sublanguage is DML, or Data Manipulation Language.
So this is going to be the subsection of the language that
does things like selecting data, or querying data.
So SELECT statements are primarily
used in things like reporting.
It also is classified as INSERTs--
so an INSERT statement.
So that is inserting data into a table--
so inserting a row or rows into a table.
DML also includes UPDATE.
So an UPDATE statement allows us to modify data,
change existing data that's in a table
into whatever is the desired state.
And finally, DELETE--
DELETE is the removing of a row or rows from a table.
So all of these three--
SELECT, INSERT, UPDATE, and DELETE--
belong to the DML portion, or the DML sublanguage of SQL.
The next sublanguage is DDL, or Data Definition Language.
So this is going to be the aspect of SQL
where we manipulate database objects.
So those are going to be where we create the definition
of those objects themselves.
So rather than selecting data from an object
or inserting data into an object,
here we're actually creating the objects,
or we're dropping them, or we're changing the objects
in some fundamental way.
So a CREATE TABLE statement falls under DDL.
So CREATE TABLE would actually create the column structure,
the storage structure of a table for DML statements
to be able to manipulate data.
Something like a DROP INDEX statement would be DDL--
dropping an existing index in the database.
ALTER SEQUENCE-- SEQUENCE is a database object
that contains a sequential number that's
used usually in row data.
An ALTER SEQUENCE would be considered
DDL, as would ALTER TABLE.
So those fall under the category of Data Definition Language.
DCL-- now, DML and DDL are pretty well-used terms
in referring to sublanguages of SQL.
You hear the term DCL less often.
So DCL will be Data Control Language,
and here we're talking about things like data access,
and primarily permissions.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.