How Data is Organized in the Teradata DBS - Interactive Teradata Query Facility

Interactive Teradata Query User Guide

Product
Interactive Teradata Query Facility
Release Number
15.00
Language
English (United States)
Last Update
2018-09-28
dita:id
B035-2452
lifecycle
previous
Product Category
Teradata Tools and Utilities

How Data is Organized in the Teradata DBS

Data on the Teradata DBS is stored in relational databases. Think of a relational database as a collection of data organized into one or more tables.

A table represents data in two dimensions: vertical columns and horizontal rows. When you create a table, you give it a name. For example, the table shown in Figure 2 is named Mobile_Homes.

Figure 2: Table in a Database

You also give each column a name, which you then use when you refer to specific table data. Column names in the Mobile_Homes table are Model_Name, Sq_Feet, and Color.

Each row represents an entry in the table. The intersection of a column and a row is called a “field.” The content of a field is its “value”. For example, the fourth row of the Mobile_Homes table has three fields. The value in the Model_Name field is “Del Fuego.”

Figure 3 shows two example tables that are part of a database named “Personnel.” While not intended to represent the complex needs of an actual company, these tables are used throughout this guide to illustrate the principles of Teradata SQL usage.

Figure 3: Example Tables in a Personnel Database

The Personnel database and four tables (“Employee,” “Department,” “Charges,” and “Project”) are provided, with the “SELECT” privilege granted to “PUBLIC,” on each new installation.

This means that you should be able to replicate the SELECT examples from your terminal.

The “Employee” and “Department” tables are used in most of the examples. The contents and columns in these tables are as follows:

  • Employee
  • For each employee, the Employee table lists the employee number (EmpNo), name (Name), department number (DeptNo), job title (JobTitle), salary (Salary), years of experience (YrsExp), date of birth (DOB), sex (Sex), race (Race), marital status (MStat), education level (EdLev), and handicap status (HCap).

  • Department
  • For each company department, the Department table lists the department number (DeptNo), department name (DeptName), location (Loc), and employee number (MgrNo) of the department manager.

    See Appendix A of this guide for the definitions and contents of all the sample tables.