Tuesday 12 February 2013

15. Teradata SQL

Structured Query Language (SQL)

Structured Query Language (SQL) is the language used to access the
database. It is sometimes referred to as a Fourth Generation Language
(4GL) to differentiate it from Third Generation Languages such as
FORTRAN and COBOL, though it is quite different from other 4GLs. It
acts as an intermediary between the user and the database. SQL defines
the answer set that is returned from the database.
SQL is different from other computer languages. Its statements resemble
English-like structures. It provides powerful, set-oriented database
manipulation including
structural modification, data retrieval,
modification
, and security functions.

There are four important subsets of SQL: the Data Definition Language,
the Data Manipulation Language, Data Control Language and Stored
Procedure Language.

Data Definition Language (DDL)
DDL allows a user to define the
database objects and the relationships
that exist among them
. Examples of DDL uses are creating or modifying
tables and views.

Data Manipulation Language (DML)
DML consists of the
statements that manipulate, change, or retrieve
the data rows
of the database. If the DDL defines the database, the DML
lets the user change the information contained in the database. The DML
is the most commonly used subset of SQL. It is used to select, update,
delete, and insert rows.

Data Control Language (DCL)
DCL is used to
restrict or permit a user's access. It can selectively limit
a user's ability to retrieve, add, or modify data. It is used to grant and
revoke access privileges on tables and views.

Stored Procedure Language (SPL)
SPL is used to
create and call stored procedures in Teradata.

Teradata Extensions to SQL
User Assistance commands allow you to list the objects in a database or
the characteristics of a table, see how a query will execute, or show the
details of your system. They vary widely from vendor to vendor.

No comments:

Post a Comment