Database Design   «Prev  Next»
Lesson 6 Structured Query Language
ObjectiveWhy is SQL the common language of relational databases?

Why is SQL the Common Language of Relational Databases?

(SQL, pronounced “sequel”) Structured Query Language has been adopted internationally as the standard language for creating relational databases.
It is considered the common language of relational databases because it serves as both a data definition language (DDL) and data manipulation language (DML).
  1. data definition language (DDL) : A collection of programming statements that describe and define data and data relationships in a database.
  2. data manipulation language (DML): A collection of programming statements used to manipulate a database.

Data definition language

As a data definition language (DDL), SQL contains statements that:
  1. Create (and delete) tables
  2. Modify tables (add, delete, or change fields)
  3. Create (and delete) user views

Let us take another look at the Employees table.

Employees table containing 1) primary key EmpID 2) fields a) LastName, b) FirstName, c)HireDate
Employees table containing 1) primary key EmpID 2) fields a) LastName, b) FirstName, c)HireDate

The section of the Employees table outlined in red contains the actual structures (one table with four fields) created by SQL statements. To specify EmpID as the primary key field for the table requires an additional statement.
The MouseOver below illustrates the six SQL statements used to create the Employees table. Position your mouse over each SQL statement to see the explanations.
(Note: MouseOver the following image to see a static rendition of the illustration.)

Sql Statements
nothing selected

Create Table with Sql
Creates the Employees table

Different Dialects of SQL

SQL comes in several dialects, so the syntax of statements is not uniform. For example, one dialect may require parentheses to enclose certain elements in SQL statements, another may use colons between elements, and so on.

Data manipulation language

As a data manipulation language (DML), SQL contains statements that manipulate data, enabling you to:
  1. Create queries
  2. Modify records (insert, delete, or update them)
  3. Invoke user views
In addition, the DML capabilities built into SQL usually include mathematical and statistical calculations that assist in generating reports.
In the next lesson, the functions of a relational database management system (RDBMS), whose major component is SQL, will be discussed.