EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Free Courses
  • Certification Courses
  • 360+ Courses All in One Bundle
  • Login
Home Data Science Data Science Tutorials Teradata Tutorial Teradata data types
Secondary Sidebar
Teradata Tutorial
  • Basic
    • What is Teradata
    • Career In Teradata
    • Teradata Architecture
    • Teradata data types
    • Teradata ODBC Driver
    • Teradata Vantage
    • Insert into Teradata
    • Teradata CASE Statement
    • Teradata Partition by
    • Teradata Date Formats
    • Teradata Current Date
    • Teradata Substring
    • Teradata BTEQ
    • Teradata Concatenate
    • Teradata REPLACE
    • Teradata Joins
    • Primary Index in Teradata
    • Fastload in Teradata
    • Collect Stats in Teradata
    • Teradata Volatile Table
    • Teradata TPT
    • Teradata Qualify
    • Teradata?coalesce
    • Teradata RENAME TABLE
    • Teradata Viewpoint
    • Teradata Performance Tuning
    • Teradata AMP
    • Teradata Utilities

Teradata data types

Teradata data types

Introduction to Teradata data types

When it comes to structured data Teradata is one of the famous data storage engines in the market. It is among the most popular relational database management systems around the globe. As with any other programming language or tools around us, datatypes play a major role in Teradata too. These data types provide the compiler with the knowledge of the type of data expected to be fed for processing. So as like other programming and database systems, the Teradata systems will also understand the nature of the data injected based on the data type being used upon. Here in Teradata to the datatype values are widely classified. These classifications are listed in the below coming sections. In this topic, we are going to learn about Teradata data types.

Typical Classification of datatypes

In every database system and programming system, these datatype values are widely classified into three major sections. Even in Teradata this broader classification widely applies. These sections decide the type of data being handled upon. Almost all types of data values in and around the world can be sectioned under these three categories of data. This broad categorization is mentioned below for reference,

Start Your Free Data Science Course

Hadoop, Data Science, Statistics & others

All in One Data Science Bundle(360+ Courses, 50+ projects)
Python TutorialMachine LearningAWSArtificial Intelligence
TableauR ProgrammingPowerBIDeep Learning
Price
View Courses
360+ Online Courses | 50+ projects | 1500+ Hours | Verifiable Certificates | Lifetime Access
4.7 (86,060 ratings)
  • Integer
  • Floating point
  • Character

The above mentioned are the very broad categorizations of datatypes, these broad classifications can be subdivided further based on the exact type of data being used, When considering for Teradata systems the type of data being handled can be furtherly classified as like listed in the below-given segment,

Teradata based datatype Classifications

1. ARRAY and VARRAY:  When the data processed has more than one dimension’s associated with it and if all these dimensions fall under a specific data format then these come under the umbrella of array data types, In arrays, the data can be stored in both Matrix (table-like format) and even in sequential format. Here all the values in the array need to be of the same type of values.

Example: Multidimensional (n-D) VARRAY

2. Byte:  In Byte the data will be stored as streams. Here no preferred translations happen to the data when stored in the Teradata database. When the data is moved from the client system it will be stored as it is it was in the client systems.

Example: Byte and BLOB objects

3. Character:  All character values can be accommodated under the character datatype section.  Here all the character-based values are usually stored.

Example: char and CLOB

4. Dataset:  Here the data will itself have its own schema, according to the schema mentioned the data will be stored.

Example: AVRO

Teradata data types output 1

5. DateTime:  The datetime category represents the various date and time-based values that can be used and stored. In Teradata, the following below given examples below list the various date and time-based values which are allowed for storage.

Example: DATE, TIME, TIMESTAMP, TIME WITH TIME ZONE

6. Interval:  The Interval datatype is concerned with values that involve a period associated with it. These data values where a period is involved can be in form of hours, minutes, seconds, days, years, months, etc.

Example: INTERVAL YEAR, INTERVAL YEAR TO MONTH, INTERVAL, INTERVAL DAY TO MINUTE, INTERVAL HOUR TO MINUTE, INTERVAL HOUR TO SECOND, INTERVAL DAY TO SECOND, INTERVAL DAY, INTERVAL MINUTE TO SECOND, INTERVAL DAY TO HOUR, INTERVAL MINUTE, INTERVAL HOUR

7. JSON:  To cover all the data which falls under the JSON (JavaScript Object Notation) format in Teradata the JSON datatypes are used. So using this data type JSON based values can be represented and used.

Example: JSON

8. Numeric:  For covering all the number-based data values the Numeric data types are used. So, all integer-based variants or floating precession values can be classified under the numeric category section of the

Example: Number, Smallint, Bigint, FLOAT/REAL/DOUBLE PRECISION, Decimal, Numeric, Byteint, Integer.

9. Parameter: These are data types that are passed with the method and function inputs and stored procedures or several other related items in a method.

Example: VARIANT_TYPE

10. Period: A Period information kind represents a time duration, wherein a duration is a hard and fast of contiguous time granules that extends from a starting certain as much as however now no longer such as a finishing certain.

Example: PERIOD(TIME),PERIOD(TIMESTAMP),PERIOD(TIMESTAMP WITH TIME ZONE),PERIOD(TIME WITH TIME ZONE),PERIOD(DATE)

11. UDT: UDT (User-Defined Type) statistics sorts are convention statistics sorts which you summary to version the shape and demeanor of the statistics utilized by your applications.

Example: Structured

12. XML: The XML material kind signifies XML content. The evidence is saved in a solid binary shape that jellies the records set of the XML document, which comprises the pyramid records and sort records resultant from XML validation.

Example: XML

Teradata Datatypes Example

In the Below given example a Teradata Database is created in the Teradata systems, Here the database is created of the name EDUCBA,

Query: CREATE DATABASE EDUCBA AS PERMANENT = 1000,SPOOL=1000;

Snapshot:

Teradata data types output 2

A Table is created inside this database and the table is generated with classified datatypes available in Teradata, The below-given snap references the table creation process and the corresponding console output along with a response of the table notified as successfully generated,

Query:

  • CREATE SET TABLE EDUCBA.DATATYPES(ID INTEGER,NAME VARCHAR(100),AGE SMALLINT,DEPARTMENT VARCHAR(3),SALARY BYTE,JOINING_DATE PERIOD(DATE));
  • HELP TABLE EDUCBA.DATATYPES;

Snapshot:

Teradata data types output 3

output 3.2

Insert table queries are initiated below for the table insertion process, which allows all the corresponding records to get inserted into the table. Then the snapshot below references the process of displaying the inserted records onto the console.

Query:

  • INSERT INTO EDUCBA.DATATYPES(ID, NAME,AGE,DEPARTMENT,SALARY,JOINING_DATE) VALUES(102,’EDWARD WASKAVAGE’,47,103,’0007B23’XB,PERIOD(CURRENT_DATE))
  • INSERT INTO EDUCBA.DATATYPES(ID,NAME,AGE,DEPARTMENT,SALARY,JOINING_DATE) VALUES(103,’GUPTA’,45,103,’0007B23’XB,PERIOD(CURRENT_DATE))
  • INSERT INTO EDUCBA.DATATYPES(ID,NAME,AGE,DEPARTMENT,SALARY,JOINING_DATE) VALUES(104,’HELIX’,46,103,’0007B23’XB,PERIOD(CURRENT_DATE))
  • INSERT INTO EDUCBA.DATATYPES(ID,NAME,AGE,DEPARTMENT,SALARY,JOINING_DATE) VALUES(105,’MIKE GORDENESER’,27,102,’0007B23’XB,PERIOD(CURRENT_DATE))
  • INSERT INTO EDUCBA.DATATYPES(ID,NAME,AGE,DEPARTMENT,SALARY,JOINING_DATE) VALUES(106,’RAMESH THILAK’,56,107,’0007B23’XB,PERIOD(CURRENT_DATE))
  • SELECT * FROM EDUCBA.DATATYPES;

Snapshot:

output 4

output 4.2

Conclusion – Teradata data types

With the rise of data and artificial intelligence the need for processing data is also getting increased significantly, to suppress this need all database-oriented enterprises are expanding their data process capabilities with new features and techniques, this impact can be widely seen in Teradata datatypes where the types and formats through which Teradata stored data can be handled are very classified and deep-rooted to data-oriented techniques.

Recommended Articles

This is a guide to Teradata data types. Here we discuss the Typical Classification of datatypes along with the query and examples. You may also have a look at the following articles to learn more –

  1. Insert into Teradata
  2. Teradata Architecture
  3. Teradata Date Formats
  4. Teradata Partition by
Popular Course in this category
Data Visualization Training (15 Courses, 5+ Projects)
  15 Online Courses |  5 Hands-on Projects |  105+ Hours |  Verifiable Certificate of Completion
4.5
Price

View Course
0 Shares
Share
Tweet
Share
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Database Management
  • Machine Learning
  • All Tutorials
Certification Courses
  • All Courses
  • Data Science Course - All in One Bundle
  • Machine Learning Course
  • Hadoop Certification Training
  • Cloud Computing Training Course
  • R Programming Course
  • AWS Training Course
  • SAS Training Course

ISO 10004:2018 & ISO 9001:2015 Certified

© 2022 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Data Science Course

SPSS, Data visualization with Python, Matplotlib Library, Seaborn Package

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA
Free Data Science Course

Hadoop, Data Science, Statistics & others

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

By signing up, you agree to our Terms of Use and Privacy Policy.

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more