0% found this document useful (0 votes)
141 views25 pages

Eradata: Communication in Teradata Teradata DDL's & DML's BTEQ-Intro Session Modes

Teradata is a massively parallel processing (MPP) relational database management system (RDBMS) that is used as the data warehouse platform for many large companies. It uses a shared nothing architecture with multiple processing nodes that work together. Teradata allows for built-in parallelism and is designed for data warehousing and decision support systems. BTEQ is a command line utility that allows users to connect to Teradata and run SQL statements either interactively or in batch mode through script files. It provides an efficient way to access the Teradata database for tasks like reporting,

Uploaded by

justintimepass
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
141 views25 pages

Eradata: Communication in Teradata Teradata DDL's & DML's BTEQ-Intro Session Modes

Teradata is a massively parallel processing (MPP) relational database management system (RDBMS) that is used as the data warehouse platform for many large companies. It uses a shared nothing architecture with multiple processing nodes that work together. Teradata allows for built-in parallelism and is designed for data warehousing and decision support systems. BTEQ is a command line utility that allows users to connect to Teradata and run SQL statements either interactively or in batch mode through script files. It provides an efficient way to access the Teradata database for tasks like reporting,

Uploaded by

justintimepass
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

TERADATA

Communication in Teradata
Teradata DDLs & DMLs BTEQ-Intro Session Modes

Teradata is an RDBMS that drives companys datawarehouse. Teradata is a collection of objects that provide a logical grouping for information Teradata can be implemented on Unix-based platforms and also on Windows NT. Clients Walmart , kmart, BOA, Whirlpool,Nike AT&T,ICICI Bank,Andhra Bank,Vodafone,British Airways,

FEATURES OF TERADATA
Acts as a server Runs on single(SMP) and multiple nodes(MPP) Built in parallelism Compatible with ANSI standards Designed for DW and DSS Uses massively parallel processing Architecture Uses Shared nothing architecture
Teradata performs the best when data is evenly distributed

HISORY OF TERADATA
1979 Founded in Los Angels USA 1982 YNET technology developed 1991 Acquired by AT&T 1992 Merged into NCR 1996 TDV2 released 2002 TDV2R5 2006 Seperated from NSR 2007 TD12 2009 TD13(viewpoint) Upcoming TD14

IMPORTANT COMPONENTS IN THE


ARCHITECTURE

Parsing Engine(PE) BYNET AMP(Access Module Processor) Disk Storage Virtual Processors (AMP+PE) Set of software processors that runs under TD PDE(parallel DB extensions)

PE 1.Session Control --Logon Logoff ,managing sessions 2.Acts as Parser 3.Parse and optimize SQL requests 4.Give optimized plan to AMP via Bynet 5. Send query result back to requesting client 6. Does hashing data 7.Capable of handling 120 sessions in parallel and 64 joins in a query

BYNET 1.Loosely couples SMP nodes in a multi node system 2.carries messages between AMP and PEs 3.Communication between nodes ---point to point, broadcast and multicast 4.Merges answers sets back to PE 5.Allows parallelism

AMP

Performs DB and file managenemt operations responsible for Finding the request rows Locks Sorting Joins Output data conversion Accounting/journaling Disk space management Recovery processing Controls portion of a DB Capable of running 80 tasks in parallel

HELP AND SHOW COMMANDS


Help comand is used to get information about various data objects Help database training---details abt DB Help session--details abt session

Show displays the DDL of certain objects This includes tables, views, macros, triggers and StoredProcedures

TERADATA DATABASE OBJECTS


Tables: Two-dimensional structures of columns and rows. Views: Subsets of one or more tables or other views that lack physical rows, pre-defines using a single SELECT statement. Macros: Definitions of one or more Teradata SQL and report formatting commands. Triggers: One or more Teradata SQL statements associated with a table and executed when specified conditions are met. Stored Procedures: Combinations of procedural and non-procedural statements run using a single call statement.

COMUNICATION IN TERADATA

Bynet carries messages between AMPs and PEs Broadcast : Single message delivered to all the nodes. Point to Point : Single message sent to single vproc.

Multicast : Message sent to a group of vprocs.

TYPES OF TABLES
Permanent tables Derived tables--query executionSpool space Interm tables-- stored permanently in the DB Volatile table--valid only for the session Global temporary table--structure and data within the session and structure outside the session

TERADATA DDLS

Data Definition Language 1.Create 2.Drop 3.Alter

Note: Only privilaged users can execute these.

CREATING A TABLE

Data options 1.set 2.Multiset Memory Options 1.Freespace 2.Datablocksize Recovery options 1.Fallback/No Fall back 2.Before Journal/No Before Journal 3.After Journal/No After Journal

Column Definitions Constraints Indexes

CREATE SET/MULTISET TABLE <TABLENAME> COLUMN DEFINITIONS CONSTRAINTS INDEXES

Eg: CREATE set table student, no fallback (studentId integer,studentname Varchar(50),DateofBirth date format 'YYYY-MM-DD',Group Varchar(10)) primary Index StudentId Eg: CREATE Multiset table Employee,fallback (EmployeeId Integer NOTNULL Primary Key,Employeename varchar(50),Salary Integer,DOJ date format 'YYYY-MM-DD') unique PrimaryIndex(EmployeeId)-

DROP

Drop is used to permanently delete a table. (No Roll back) The entire structure and data are deleted and the memory is freed. Need to be used with caution.

DROP TABLE <TABLENAME>

ALTER

You can Add/ remove a column from an existing table using ALTER TABLE command. The ALTER TABLE statement with MODIFY option cannot be used to change the name of a column or TABLE. Column to be modified should be empty to decrease column length

Column to be modified should be empty to change the data type


ALTER TABLE command can not be used to drop the column if the table is having only one column.

ALTER TABLE customerdemo ADD CONSTRAINT Pkey1 PRIMARY KEY (accountno); ALTER TABLE customerdemo DROP CONSTRAINT Pkey1

TERADATA DMLS

Insert Update Delete Select

INSERT

INSERT : Insert new rows into a table. Syntax : INSERT INTO <Table name> VALUES (expression)

We have two methods to insert 1.By value method Eg: Insert into student values(1,'vidya',100) Insert into student values(2,'Adithi',200) 2.Specified columns using value method Eg:Insert into student (no,name) values(3,'Krishna) Insert into student (no,name) values(4,'Vamsi')

UPDATE
UPDATE <TABLE NAME> SET columnname=value [ WHERE condition] Updating All rows

UPDATE customer SET dateofreg = NULL

Updating specific row:

UPDATE customer SET dateofreg = NULL


WHERE customerid='C1;

DELETE
DELETE FROM <TABLE NAME> WHERE condition

Deleting all rows

DELETE FROM customer;

Deleting specific rows

DELETE FROM customer WHERE customerid = C1;

SELECT

To select all rows

SELECT * FROM customer;

To select Specified rows

SELECT customerid, customername, dateofreg,

userid, password FROM customer;

BTEQ
Process Commands, Queries and Data Route Response to Terminal, Files or Printer Usage > Batch Job Scripts > Report Formatting > Ad Hoc Query Tool > Database Administration > SQL Development and Testing Consistent Look and Feel Across Platforms

BTEQ-INTRO

BTEQ is an abbreviation of Basic Teradata Query. It facilitates the communication with the Teradata systems. BTEQ provides the most efficient way to access the Teradata Database. This is command based utility and it has two modes of operations Interactive mode and batch mode. Interactive mode consist of a GUI for interaction with Teradata while batch mode does not. The Interactive mode and Teradata SQL assistant are different thing. BTEQ is Used for reporting & useful in exporting & importing data in (Small volume) (Ex FastExport Script) BTEQ uses CLIv2(Call level interface i.e. CLI) where as SQL assistant uses ODBC driver(Need to configure in your system) BTEQ is a Command Driven Utility and SQL is GUI based BTEQ Supports conditional logic but SQL does not.

SESSION MODES
Bynet handles session control. Logon/Logoff Managing sessions(120) A BTEQ session is created by giving LOGON along with required credentials.

Interactive Mode : User submits commands to the database as and when needed or as and when demand arises. Batch Mode : BTEQ commands and SQL statements are written in a scripted file and then submitted in a batch to BTEQ for processing.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy