Work with Views | Teradata Vantage - Working with Views - Advanced SQL Engine - Teradata Database

Database Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
upb1600054424724.ditamap
dita:ditavalPath
upb1600054424724.ditaval
dita:id
B035-1093
lifecycle
previous
Product Category
Teradata Vantageā„¢

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
  • Teradata Studio

BTEQ and Teradata Studio allow you to submit CREATE VIEW DDL statements to Advanced SQL Engine.