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

Teradata RDBMS Database Administration - NCR

NCR Teradata RDBMS Database Administration - NCR , 2004. - 616 p.
Download (direct link): teradatadatabaseadmin2004.pdf
Previous << 1 .. 43 44 45 46 47 48 < 49 > 50 51 52 53 54 55 .. 218 >> Next

For non-preprocessor applications that are affected by restructuring, you can create a view to modify the underlying representation of the data to its earlier form for use by a program.If adding columns to a table has made it necessary, in the interest of normalization, to divide a table into two tables, creating a view that defines a join of the two tables may allow applications to continue to use data from the original table.

However, the program may not use the same view for updating because the join precludes this. To enable the program to update, you may have to create views on the individual tables and modify the program to refer to these views.

A request via a view takes slightly more processing time than a normal request. However, the extra cost in processing time is more than compensated for by the gain in user productivity and ease of use.

For more information on how you can use views, see "Views" on page 2-74

Converting to Relational Data Structures

When introducing relational technology into an organization, you will have to convert existing files and data structures used by other data management systems. For example, you may have to convert one or more of the following:

Flat files

VSAM files

DB2 tables

IMS structures

2 - 64

Teradata RDBMS Database Administration Chapter 2: Building the Teradata RDBMS

Converting Non-Relational Data Structures

Using Information Management System (IMS) as an example, this section provides guidelines for performing a conversion by:

Identifying design similarities

Modifying applications

Performing the conversion steps

Identifying Design Similarities

Database design principles are often followed in designing IMS data structures. As a result:

There may be a one-to-one correspondence between an IMS physical or logical segment and a Teradata RDBMS table.

The key for an IMS root segment may serve as the PI of the corresponding table.

The key of a dependent segment may serve as an SI of the corresponding table, or as a component of the PI.

Secondary IMS indexes can be implemented as SIs for the corresponding table.

For performance reasons, when two IMS logical data categories are combined into one segment, or one category is split into two segments, you may want to use the same rationale in mapping the segments into tables.

Modifying Applications

The effort required to convert a DL/I application is directly proportional to the design correspondence between the IMS segment on which the application operates and the Teradata RDBMS table. At a minimum, you must make the following changes to a DL/I application program:

Step Action
1 Remove database segment layouts and SSA code.
2 Add DATA BEGIN and DATA END statements, and fields that are to be referred to in the Teradata SQL syntax.
3 If you are in Teradata mode, then add Teradata SQL BEGIN TRANSACTION and END TRANSACTION statements where necessary.
4 If you are in ANSI mode, then add COMMIT statements where necessary.
5 Replace DL/I GET, ISRT, DLET, and REPL code with corresponding Teradata SQL statements and ONERROR logic.
6 Add Teradata SQL SELECT, INSERT, DELETE, and UPDATE statements.
7 Incorporate OPEN, FETCH, and CLOSE syntax into program loops that read multiple records

2 - 64 Teradata RDBMS Database Administration

Chapter 2: Building the Teradata RDBMS

Converting Non-Relational Data Structures

Conversion Steps

When converting an existing data management system to Teradata RDBMS tables, follow these general conversion steps:

Step Action
1 Review your database design.
2 Define databases, tables, indexes, and views and model the data.
3 Establish an error code scheme.
4 Develop programs to verify relational integrity.
5 Establish security procedures and create users.
6 Develop and test backup and disaster recovery procedures.
7 Validate database design and resource projections through prototyping.

Plan for database conversion, as follows:


Step Action
a Unload IMS segments into flat file format corresponding to table definitions.
b Create Teradata RDBMS tables with defined PIs.
c Set up and run FastLoad utility jobs to load data into the tables.
d Create SIs.
e Collect statistics.
f Validate query results.
g Validate performance.

For more information on converting to relational data structures, see Teradata RDBMS Database Design.

2 - 64

Teradata RDBMS Database Administration Chapter 2: Building the Teradata RDBMS

Populating Tables

Populating Tables

You populate Teradata tables using a Teradata load facility. In addition to tools such as BTEQ and TPump, Teradata offers a variety of specially-designed load utilities, including MultiLoad and FastLoad.

The decision as to which utility to use depends on what features you plan to implement in your database, such as partitioning, indexes, compression, triggers, and so forth. Several of the major issues are discussed in the rest of this section. For an introduction to each utility, a feature comparison, and guidelines based on application types, see "Import/Export Utilities" on page B-2.
Previous << 1 .. 43 44 45 46 47 48 < 49 > 50 51 52 53 54 55 .. 218 >> Next