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

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 195 196 197 198 199 200 < 201 > 202 203 204 205 206 207 .. 241 >> Next


Teradata SQL has several formats for hexadecimal strings whereas

DB2 has one (X’nn[nn]...’).

DB2 allows duplicate rows to exist in a table.

The current release of the Teradata RDBMS allows duplicate rows if:

• the table was created using the CREATE MULTISET TABLE... statement.

• neither SET nor MULTISET were specified when the table was created, and the session is running in ANSI mode.

• there are no UNIQUE or PRIMARY KEY constraints and no UNIQUE indexes.

The current release of the Teradata RDBMS does not allow duplicate

rows if:

• the table was created using the CREATE SET TABLE . statement.

• neither SET nor MULTSET were specified when the table was created, and the session is running in Teradata mode.

• there is a UNIQUE or PRIMARY constraint on a UNIQUE index.

Teradata RDBMS for UNIX SQL Reference
Comparing Teradata SQL and DB2

DB2 and Teradata SQL Differences

Note: Duplicate rows are not allowed in a purely relational DBMS and are supported only for ANSI compliance.

The Language Preprocessors supplied with DB2 have different Language PrePrOCessOrs syntax and functionality from those supplied with the Teradata

RDBMS. In addition, DB2 supports Assembler and FORTRAN.

LONG VARCHAR

LONG VARGRAPHIC

The LONG VARCHAR data type slightly differs.

In Teradata SQL, LONG VARCHAR is equal to VARCHAR(32000).

In both Teradata SQL and DB2, the maximum length of a LONG VARCHAR field is determined by the number of bytes remaining in a page after allowing for the space taken by columns of all other data types. In Teradata SQL the row cannot be larger than 32,128 bytes, and in DB2, a 4K page row cannot be larger than 4,046 bytes, and a 32K page row cannot be larger than 32,704 bytes.

The LONG VARGRAPHIC data type differs slightly.

In Teradata SQL, LONG VARGRAPHIC is equal to VARGRAPHIC (16000).

In Teradata SQL and DB2, the maximum length of a LONG VARGRAPHIC field is determined by the number of bytes remaining in a page after allowing for the space taken by columns of all other data types. In Teradata SQL the row cannot be larger than 32,128 bytes and in DB2, a 4K page row cannot be larger than 4,046 bytes, and a 32K page row cannot be larger than 32,704 bytes.

Graphic Pad Character

In DB2 the graphic pad character is IDEOGRAPHIC SPACE. In Teradata SQL it is two bytes, with all bits zero.

Multibyte Characters

Both the Teradata RDBMS and DB2 support multibyte characters in CHARACTER, VARCHAR, and LONG VARCHAR data types, but the implementation differs. Teradata RDBMS allows explicit specification of CHAR SBC, CHAR MBC, or CHAR MIXED. Teradata RDBMS does not support an explicit CHAR modifier.

On a Japanese character supported site, all CHAR data is assumed to be mixed (single byte characters and/or multibyte characters) and the character types is determined either by the syntax of the data (Shift-Out/Shift-In style) or by the character byte configuration.

Request = Transaction?

In Teradata mode, unless explicitly overridden, Teradata RDBMS treats each request as a transaction; DB2 does not.

Teradata RDBMS for UNIX SQL Reference

C-5
Comparing Teradata SQL and DB2

DB2 and Teradata SQL Differences

2PC Applications

VALIDPROC, EDITPROC Vs. COMPRESS

Privileges Differ

Table Locking

Each product uses different syntax to explicitly define a transaction.

In Teradata mode, Teradata RDBMS provides BEGIN TRANSACTION (BT) and END TRANSACTION (ET) statements as well as a ROLLBACK statement. DB2 provides only COMMIT and ROLLBACK statements, both of which end the current transaction and implicitly begin the next.

In ANSI mode, the Teradata RDBMS provides the COMMIT or ROLLBACK statements, followed optionally by the keyword WORK, to indicate the end of the current transaction, or respectively, back out changes made to the database as a result of the transaction.

2PC Applications: DB2 ISV products executing CICS run in 2PC mode, and 2PC mode is not supported on the Teradata RDBMS prior to Teradata RDBMS Version 1 Release 5.0 or prior to Version 2 Release 2.0. For CICS, TS/API Release 2.1 program for CICS TA will instruct installers how to order necessary add-on tapes.

Teradata RDBMS software does not support execution of DDL (Database Definition Language) statements in 2PC sessions. This causes some limitations in ISV products which issue DDL statements internally. The TS/API translation program processes all DDL statements in a 1PC session and all DML statements in a 2PC session. Refer to the latest Teradata TS/API System & Database Administration Guide, for more detail on this issue.

DB2 has a VALIDPROC phrase to specify a validation procedure for rows being added to the table, an EDITPROC phrase to specify an edit procedure for rows retrieved, updated, or inserted from a table, and a FIELDPROC phrase to specify decode/encode functions for a string column. Teradata RDBMS does not support these phrases.

Previous << 1 .. 195 196 197 198 199 200 < 201 > 202 203 204 205 206 207 .. 241 >> Next