Working with Views - Teradata Database

Teradata Database Administration

Teradata Database
Release Number
English (United States)
Last Update
Product Category

Database views are created from one or more base tables or from other views. They are virtual tables that you can use to retrieve data from the underlying views or tables. A view does not contain data so it does not use any space. Only the view definitions are stored in the Data Dictionary.

A view may present only a subset of the columns and rows in the base table or tables. In addition, a column defined in a view can be derived and does not need to exist in the underlying base tables. For example, you can display summed or averaged data in a view column.

Views are generally used to:

  • Allow users to access only the rows and columns they need in a table.
  • Enforce security by restricting table access and updates.
  • Provide well-defined, well-tested, high-performance access paths to data.
  • Provide logical data independence, which minimizes the need to modify your applications if you restructure base tables.
  • Format the output of the data for reports.
  • Specify locking, such as specifying a less restrictive ACCESS lock.
  • To ensure data integrity and system security, Teradata recommends the following:

  • Set privileges so that general users cannot access or modify data tables directly.
  • Create views which allow general users to access or modify only the table data they need. Use views to restrict users to performing specific queries and update functions.
  • Create views in a Views Database.
  • You can use the following utilities to create views in Teradata:

  • BTEQ
  • SQL Assistant
  • BTEQ and SQL Assistant allow you to submit CREATE VIEW DDL statements to Teradata Database.