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 Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 95 96 97 98 99 100 < 101 > 102 103 104 105 106 107 .. 218 >> Next


Reading data with RAID 1 is faster than RAID S (used in EMC) and RAID 0 (no RAID protection), since the system uses both disks to access the data blocks. Traditionally, RAID 1 has been used for critical fault-tolerant transaction processing. When small data block sizes are used, mirrored data can provide high reliability with a high I/O rate. However, RAID 1 requires double the amount of disk space.

RAID 5

RAID 5 protects data using parity data to reconstruct the data on a failed disk.

With RAID 5, data is striped across multiple disks and a parity bit is saved on the remaining disk.

RAID 5 allows you to achieve data redundancy without maintaining a mirror disk for each data disk. The trade-off is that 25% of the available disk space must be allocated to parity storage, and reconstruction of the missing data takes slightly more time than switching over to a mirrored disk.

Teradata RDBMS Database Administration

7 - 5 Chapter 7: Protecting Data

Disk Arrays and RAID Technology

Data Recovery with RAID5

Although you can continue to operate a RAID 5 array with a failed drive, you should replace the drive as soon as possible (see "Moving Vprocs and Data Rows for Hardware Upgrades" on page A-15). Also, although RAID 5 provides data redundancy, regular backups are still needed for rollbacks, accidental deletions, and disaster recovery.

Calculating Parity

RAID 5 and RAID S are more economical in disk space usage, though they do require some overhead when performing a write operation. Each write operation requires the following steps:

Step Action
1 Read old data.
2 Read old parity block.
3 Write new data.
4 Write new parity.

Parity uses a binary Exclusive-Or algorithm. To determine the value of the parity bit, the algorithm calculates bits using these Exclusive-Or rules (XOR):

0 + 0 = 0

0 + 1 = 1

1 + 0 = 1

1 + 1 = 0

If any of the disks in the rank fails, the remaining disks in the rank recreate the data from the failed disk on-the-fly as users request data from that disk. Once you replace the disk, the software automatically rebuilds data using the parity scheme.

Note: If you lose two disks in one rank, you cannot access any data on that rank (unless you have defined the tables with FALLBACK; see "AMP Clustering and Fallback" on page 7-32) because RAID 5 cannot recalculate the missing data.

7 - 6

Teradata RDBMS Database Administration 7 - 5 Chapter 7: Protecting Data

Using Referential Integrity

Using Referential Integrity

A table is defined for a referential constraint with the REFERENCES clause of the CREATE/ALTER TABLE statement.

Depending on your choice of the associated options, a REFERENCES clause can apply to three forms of referential constraint1, as follows:

Referential Constraint Type DDL Clause Is Referential Integrity Enforced? Level of Enforcement Application
Referential integrity constraint REFERENCES Yes Row Tests each row during an insert, delete, or update operation. If the constraint would be violated, the AMP rejects the operation and returns an error message.
Batch referential integrity constraint REFERENCES WITH CHECK OPTION Yes Implicit transaction Tests each row throughout an entire transaction during an insert, update, or delete operation. If the constraint would be violated by any row, the Parser aborts the operation, rolls back the transaction, and returns an abort message.
Referential constraint REFERENCES WITH NO CHECK OPTION No None Does not test for referential integrity. Assumes that the user enforces data integrity with some other method.

Each type is briefly introduced in the rest of this section, emphasizing aspects that might be of special interest to you as the DBA.

Note: Special optimization of certain queries is possible with each type. For more information, plus examples of use, see "REFERENCES" and "Referential Constraints" in CREATE TABLE in Teradata RDBMS SQL Reference, Volume 4.

1When printed in lowercase letters, the term referential constraint refers to the general class of referential constraints, including standard referential integrity, batch referential integrity, and Referential Constraints.

When printed in first-letter capitals, the term Referential Constraint refers specifically to a constraint that defines a referential relationship but instructs Teradata not to enforce it.

7 - 10 Teradata RDBMS Database Administration

Chapter 7: Protecting Data

Using Referential Integrity

Standard Referential Integrity

Standard referential integrity enforces the rule that a non-null value in a referencing column (the foreign key) can exist only when an equal value exists in the column being referenced (the primary or alternate key).

The columns in a referencing (Child) table are the foreign-key (FK) columns to the candidate columns (primary key (PK) or alternate key) in the referenced (Parent) table. The columns in both tables should be defined as NOT NULL and must be identical in name, data type, quantity, and case sensitivity.
Previous << 1 .. 95 96 97 98 99 100 < 101 > 102 103 104 105 106 107 .. 218 >> Next