In this lesson, I’m going to introduce you to the SQL language.
For starters, SQL stands for Structured Query Language and you can pronounce it either as the word SEQUEL or as the individual letters S-Q-L. I prefer S-Q-L, and there’s a reason for it, but I’m not going to go into this never-ending discussion about how we should pronounce it here. Both options are considered correct in general, anyway, so, you can just peek the one you like, and use it without much thought about it.
SQL was specifically designed to be used to define, access, and manipulate data, and it is a standard of the AMERICAN NATIONAL STANDARDS INSTITUTE or ANSI.
But in spite of being a standard, most database vendors have their own implementations, which adhere more or less to the SQL standard, and Oracle is not the exception. So, even though most of the things you will learn here are most likely going to be standard, there might be some things that will only run on Oracle, and there might be some things you see running in other databases, that cannot be run without modifications on Oracle. This is usually not a big deal, but you better know about it.
Another aspect that is important to know about SQL is that it is not a procedural language.
I mean, you cannot create procedures, and there are no flow control statements or other similar things that are available in programming languages such as Java or C. Oracle has a procedural extension for SQL which you probably already heard of, that is called PL/SQL, but it is not covered in this course.
Categorization of SQL Commands
Traditionally, SQL commands have been categorized into 2 different sets: DDL, which stands for Data Definition Language, and DML, which stands for Data Manipulation Language.
DDL includes the statements needed to create and modify tables, indexes, and other data structures, and DML includes the statements needed to access and modify the data itself, not the structures.
And I want to use this opportunity to clarify that as opposed to what many people say or think, the SELECT statement, which is the one we use to read or retrieve information from the database is actually a DML statement. Many people think that DML includes only the statements that modify in some way the contents of the database, but that idea is incorrect.
This course focuses mostly on DML statements, but there is a section devoted to DDL as well.
Most recent classifications mention some other subdivisions that include TC, or transaction control statements, which are actually covered in this course, and DCL, or data control language, which includes the commands needed to grant and revoke permissions, and is not covered in this course at the moment.
Okay, this is really the only theoretical knowledge you really need to have about SQL. The rest is pure practice, and that is exactly what we are going to start doing from the next section on.
See you in the next lesson.