Tuesday 30 August 2011

Introduction of Teradata Database

The concept of teradata system is little bit different. There is only one database(your teradata system) with lots of (schemas/users). Here (schemas/users) is called database.
In this system dbc is the owner of all metadata. In dbc you can find all the object of teradata.

To get all tables name which consist the particular column.
select tablename, columnname from dbc.columns where columnname ='Emp_Id' and databasename = 'EMPDB';
To see all the objects in a particular database.
Help database databasename;

Index in Teradata


What is index. How many types of indexes in Teradata.
=> Index is physical mechanism which is used to access and distribute the data rows.
      Indexes help to fast retrieval of data set and useful to data distribution across AMP.

=>There are four main types of indexes in Teradata.
    * Primary Index
    * Secondary Index
    * Join Index
    * Hash Index

=> These indexes divided into following sub category.
    * Unique Primary Index (UPI)
    * Non-Unique Primary Index (NUPI)
    * Partitioned Primary Index(PPI)
    * Non-Partitioned Primary Index(NPPI)
    * Unique Secondary Index (USI)
    * Non-Unique Secondary Index (NUPI)

=> Join Index has six subtypes viz:
    * Single table join index(STJI)
    * Single table aggregate join index(STAJI)
    * Single table sparse join index
    * Multitable simple join index
    * Multitable aggregate join index
    * Multitable sparse join index