Previous TopicTopic MenuNext TopicSet Bookmark
Structured Query Language (SQL)

SQL is a programming language that is specialized for use with relational database management systems. The SQL language was first used to manage and manipulate data in RDBMSs long before client/server technology emerged. SQL has two main components:

  • Data Definition Language (DDL)
  • Data Manipulation Language (DML)

DDL deals with the maintenance of the structure of the database. For example, DDL includes statements that allow a database administrator to create tables, specify the types of data to be contained in the columns of a table, and define security access control for data in the database. Generally speaking, DDL statements are responsible for defining and managing the structure of the database, rather than the content of the data within the database.

DML deals with the contents of the database. DML includes statements that allow a user to perform the following operations:

  • Examine selected data from the database
  • Insert new data into the database
  • Update existing data in the database
  • Delete data from the database

DML also includes statements that allow an application to group a number of other DML statements together into a unit called a transaction. When the RDBMS executes a set of statements that are defined as a transaction, it ensures that all of the statements in the transaction complete successfully, and that, if any of the statements fail, the data in the database is returned to the same state it was in before the transaction began. For example, when a bank transfers money from one customer's checking account to another, the bank application defines a single transaction that subtracts the money from the first customer's account and then adds it to the second customer's account. If either of these two operations fail, the bank wants the entire operation to fail, and wants the contents of the database to be rolled back to the database's original, pre-transaction state.

Which of the following functions are supported by the DDL part of the SQL language?
Defining a database query
Creating a database table
Defining the structure of a database table
Controlling database security
Updating data in the database
Defining the DML statements that form a transaction



Which of the following functions are supported by the DML part of the SQL language?
Defining a database query
Creating a database table
Defining the structure of a database table
Controlling database security
Updating data in the database
Defining the DML statements that form a transaction




Go to Next Section in this Lesson
Copyright © 2000 SyberWorks, Inc.