Teradata 简明教程

Teradata - Tables

关系模型中的表定义为数据的集合。它们表示为行和列。

Tables in Relational model are defined as collection of data. They are represented as rows and columns.

Table Types

类型 Teradata 支持不同类型的表。

Types Teradata supports different types of tables.

  1. Permanent Table − This is the default table and it contains data inserted by the user and stores the data permanently.

  2. Volatile Table − The data inserted into a volatile table is retained only during the user session. The table and data is dropped at the end of the session. These tables are mainly used to hold the intermediate data during data transformation.

  3. Global Temporary Table − The definition of Global Temporary table are persistent but the data in the table is deleted at the end of user session.

  4. Derived Table − Derived table holds the intermediate results in a query. Their lifetime is within the query in which they are created, used and dropped.

Set Versus Multiset

Teradata 根据重复记录的处理方式将表分类为 SET 或 MULTISET 表。定义为 SET 表的表不存储重复记录,而 MULTISET 表则可以存储重复记录。

Teradata classifies the tables as SET or MULTISET tables based on how the duplicate records are handled. A table defined as SET table doesn’t store the duplicate records, whereas the MULTISET table can store duplicate records.

Sr.No

Table Commands & Description

1

Create TableCREATE TABLE command is used to create tables in Teradata.

2

Alter TableALTER TABLE command is used to add or drop columns from an existing table.

3

Drop TableDROP TABLE command is used to drop a table.