Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Introduction to the Teradata® RDBMS for UNIX® Version 2 Release 2.1 - NCR

NCR Introduction to the Teradata® RDBMS for UNIX® Version 2 Release 2.1 - NCR, 1998. - 315 p.
Download (direct link): inntroduktionteradata1998.pdf
Previous << 1 .. 11 12 13 14 15 16 < 17 > 18 19 20 21 22 23 .. 76 >> Next


When an operation uses a unique primary index (UPI), nonunique primary index (NUPI), or unique secondary index (USI), the message includes the row hash value, which is used by the Vnet or BYNET to route the message to the correct vproc.

The sequence of AMP step processing is as follows:

Step Step Name Function
1 Lock Ensures that users who are concurrently trying to update the same rows do not violate the consistency of the data. If the operation uses a UPI, NUPI, or USI, this step is incorporated into step 2.
2 Operation Performs the actual task required: select, delete, insert, update, sort. There may be many operation steps.
3 End transaction Required only for multiple AMP steps. If the request is for a UPI, no end transaction step is necessary. The end transaction step tells all AMPs that worked on the request that processing is complete.

Each AMP is associated with disks and uses its file system software to control the reading and writing of data on its disks.

The file system controls primitive physical data block reads, and translates AMP software row requests into physical data block requests.

Introduction to the Teradata RDBMS for UNIX

2-17
Teradata RDBMS Architecture

Structured Query Language

Structured Query Language

This topic describes SQL, the Structured Query Language.

Introduction2

SQL is the only language the Teradata RDBMS understands. It is the ANSI standard language for relational database management.

SQL has the advantage of being the most commonly used language Why SQL? 2 for relational database management systems.

Because of this, both the data structures in the database and the commands for manipulating those structures are controlled using SQL. Additionally, all applications, whether written in a client language with embedded SQL, a macro, or an ad hoc SQL query, are written and executed using the same set of instructions and syntax.

Other database management systems use different sublanguages for data definition and data manipulation and do not permit ad hoc queries of the database. This means that you must use one language to define your data and yet another to query and update it. And you are restricted to running applications written by programmers. You have very little flexibility with nonrelational database management systems.

The Teradata RDBMS has an optional feature that detects non-ANSI SQL Flagger 2 SQL extensions (for entry level ANSI SQL92 only) and reports them

back to the user (either to an embedded SQL program or to BTEQ) without terminating execution of the query.

2-18

Introduction to the Teradata RDBMS for UNIX
Teradata RDBMS Architecture

Structured Query Language

SQL Lexicon

Like any language, SQL has its rules for writing statements. The following table describes the SQL lexicon.

Lexical Component Description
Word A character string of from 1 to 30 characters derived from the following character set: • Roman characters (both cases) • Digits • $ • # • _ Keywords are a special category of words that are reserved for use in SQL statements. You cannot use keywords as object names.


Introduction to the Teradata RDBMS for UNIX

2-19
Teradata RDBMS Architecture

Structured Query Language

Lexical Component

Description

Delimiter

Special characters whose meaning depends on context. The Teradata SQL delimiters and their functions are as follows.

Delimiter Function
0 Groups expressions and defines the limits of various phrases
' Separates items in a list Acts as a date separator
Prefixes a referenced parameter or client system variable Acts as a date separator
Separates a database name from a table name Separates a table name from a column name Acts as the decimal point Acts as a date separator
Separates statements in a request Terminates a request (BTEQ)
Defines boundaries of character string constants Acts as a data separator
" Defines the boundaries of nonstandard names
/ Used as a date separator
B Blank. Used as a date separator
- Used as a date separator

Constant

Numerics, strings, and characters embedded in a statement.

2-20

Introduction to the Teradata RDBMS for UNIX
Teradata RDBMS Architecture

Structured Query Language

Lexical Component

Description

Operator

A set of symbolics used to express logical and arithmetic operations. Operators of the same precedence are evaluated from left to right. The following table shows the operators from highest to lowest precedence.

Result Type Operation
numeric + numeric - numeric
numeric numeric ** numeric
numeric numeric * numeric numeric / numeric numeric MOD numeric
numeric numeric + numeric numeric - numeric
string concatenation operator
logical value EQ value value NE value value GT value value LE value value LT value value GE value value IN set value NOT IN set value BETWEEN value AND value charvalue LIKE charvalue
logical NOT logical
logical logical AND logical
Previous << 1 .. 11 12 13 14 15 16 < 17 > 18 19 20 21 22 23 .. 76 >> Next