Derived Classes - Teradata Meta Data Services

Teradata Meta Data Services User Guide

Product
Teradata Meta Data Services
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
Product Category
Teradata Tools and Utilities

Derived Classes

The derived class functionality of MDS provides a powerful, yet easy-to-use way of tailoring the MDS metadata repository so it better suits your organization’s needs. A derived class includes all of the properties from one existing metadata class, known as the base class, plus additional properties, known as derived properties, from associated classes. The main purpose of derived classes is to improve performance when searching for data in the MDS repository. Instead of having to perform multiple searches to collect the desired metadata from various associated metadata classes, a derived class lets you achieve this through a single action.

Here is an example of a derived class named FKReference that is already provided in the MDS repository:

Figure 19: Derived Class Example

Without this derived class, if you wanted, for example, to find out the Foreign Key references for a table named Customer, you would normally have to perform multiple steps:

1 Search for a Table whose name is “Customer”.

2 Read the TableHasRefConstraints relationship for the Customer table.

This returns a collection of Reference constraint objects. The Reference object contains the RefTable property which represents the name of the referenced or parent table.

3 For each object returned from step 2, read the ConstraintReferencesColumns relationship.

This generates a collection of ReferenceColumn objects for each Reference object.

4 For each object returned from step 3, read the ReferenceColName and ForeignKeyColName properties to identify the parent and child columns for each foreign key reference.

If you used the example FKReference derived class provided in the MDS repository, the number of steps would be reduced to one:

✔ Search for a FKReference derived class whose ChildTable property is “Customer”.

In short, derived classes provided the following benefits:

  • Improved speed and performance
  • More efficient access to commonly referenced metadata
  • Simplified navigation required to access the data
  • You can similarly create additional derived classes to meet your own needs. For information on creating derived classes, see “Creating a Derived Class” on page 88 and “Creating a Derived Class Property” on page 89.