Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
Teradata SQL

Teradata SQL

Ratings: (0)|Views: 106|Likes:
Published by sonu_pal
Teradata warehouse
Teradata warehouse

More info:

Categories:Types, Research
Published by: sonu_pal on May 03, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

05/03/2012

pdf

text

original

 
Teradata SQL—Unleash the PowerChapter 1- Teradata Parallel ArchitectureChapter 2-Fundamental SQL Using SELECTChapter 3-On-line HELP and SHOW CommandsChapter 4-Data ConversionsChapter 5-AggregationChapter 6-Subquery ProcessingChapter 7-Join ProcessingChapter 8-Date and Time ProcessingChapter 9-Character String ProcessingChapter 10-OLAP FunctionsChapter 11-SET OperatorsChapter 12-Data ManipulationChapter 13-Data InterrogationChapter 14-View ProcessingChapter 15-Macro ProcessingChapter 16-Transaction ProcessingChapter 17-Reporting Totals and SubtotalsChapter 18-Data Definition LanguageChapter 19-Temporary TablesChapter 20-Trigger ProcessingChapter 21
-
Stored Procedures
Chapter 1:
Teradata Parallel Architecture
Teradata Introduction
The world's largest data warehouses commonly use the superior technology of NCR'sTeradata relational database management system (RDBMS). A data warehouse is normallyloaded directly from operational data. The majority, if not all of this data will be collected on-line as a result of normal business operations. The data warehouse therefore acts as acentral repository of the data that reflects the effectiveness of the methodologies used inrunning a business.
 
 As a result, the data loaded into the warehouse is mostly historic in nature. To get a truerepresentation of the business, normally this data is not changed once it is loaded. Instead, itis interrogated repeatedly to transform data into useful information, to discover trends andthe effectiveness of operational procedures. This interrogation is based on business rules todetermine such aspects as profitability, return on investment and evaluation of risk.For example, an airline might load all of its maintenance activity on every aircraft into thedatabase. Subsequent investigation of the data could indicate the frequency at which certainparts tend to fail. Further analysis might show that the parts are failing more often on certainmodels of aircraft. The first benefit of the new found knowledge regards the ability to plan for the next failure and maybe even the type of airplane on which the part will fail. Therefore, thepart can be on hand when and maybe where it is needed, or the part might be proactivelychanged prior to its failure.If the information reveals that the part is failing more frequently on a particular model of aircraft, this could be an indication that the aircraft manufacturer has a problem with thedesign or production of that aircraft. Another possible cause is that the maintenance crew isdoing something incorrectly and contributing to the situation. Either way, you cannot fix aproblem if you do not know that a problem exists. There is incredible power and savings inthis type of knowledge. Another business area where the Teradata database excels is in retail. It provides anenvironment that can store billions of sales. This is a critical capability when you arerecording and analyzing the sales of every item in every store around the world. Whether it isused for inventory control, marketing research or credit analysis, the data provides an insightinto the business. This type of knowledge is not easily attainable without detailed data thatrecords every aspect of the business. Tracking inventory turns, stock replenishment, or predicting the number of goods needed in a particular store yields a priceless perspectiveinto the operation of a retail outlet. This information is what enables one retailer to thrivewhile others go out of business.Teradata is flourishing with the realization that detail data is critical to the survival of abusiness in a competitive, lower margin environment. Continually, businesses are forced todo more with less. Therefore, it is vital to maximize the efforts that work well to improve profitand minimize or correct those that do not work.One computer vendor used these same techniques to determine that it cost more to sell intothe desktop environment than was realized in profit. Prior to this realization, the sales efforthad attempted to make up the loss by selling more computers. Unfortunately, increasedsales meant increased losses. Today, that company is doing much better and has made ahuge step into profitability by discontinuing the small computer line.
Teradata Architecture
The Teradata database currently runs normally on NCR Corporation's WorldMark Systemsin the UNIX MP-RAS environment. Some of these systems consist of a single processingnode (computer) while others are several hundred nodes working together in a singlesystem. The NCR nodes are based entirely on industry standard CPU processor chips,standard internal and external bus architectures like PCI and SCSI, and standard memorymodules with 4-way interleaving for speed. At the same time, Teradata can run on any hardware server in the single node environmentwhen the system runs Microsoft NT and Windows 2000. This single node may be anycomputer from a large server to a laptop.
 
Whether the system consists of a single node or is a massively parallel system withhundreds of nodes, the Teradata RDBMS uses the exact same components executing on allthe nodes in parallel. The only difference between small and large systems is the number of processing components.When these components exist on different nodes, it is essential that the componentscommunicate with each other at high speed. To facilitate the communications, the multi-nodesystems use the BYNET interconnect. It is a high speed, multi-path, dual redundantcommunications channel. Another amazing capability of the BYNET is that the bandwidthincreases with each consecutive node added into the system. There is more detail on theBYNET later in this chapter.
Teradata Components
 As previously mentioned, Teradata is the superior product today because of its paralleloperations based on its architectural design. It is the parallel processing by the major components that provide the power to move mountains of data. Teradata works more likethe early Egyptians who built the pyramids without heavy equipment using parallel,coordinated human efforts. It uses smaller nodes running several processing components allworking together on the same user request. Therefore, a monumental task is completed inrecord time.Teradata operates with three major components to achieve the parallel operations. Thesecomponents are called: Parsing Engine Processors, Access Module Processors and theMessage Passing Layer. The role of each component is discussed in thenext sectionstoprovide a better understanding of Teradata. Once we understand how Teradata works, wewill pursue the SQL that allows storage and access of the data.
Parsing Engine Processor (PEP or PE)
The Parsing Engine Processor (PEP) or Parsing Engine (PE), for short, is one of the twoprimary types of processing tasks used by Teradata. It provides the entry point into thedatabase for users on mainframe and networked computer systems. It is the primary director task within Teradata. As users "logon" to the database they establish a Teradata session. Each PE can manage120 concurrent user sessions. Within each of these sessions users submit SQL as a requestfor the database server to take an action on their behalf. The PE will then parse the SQLstatement to establish which database objects are involved. For now, let's assume that thedatabase object is a table. A table is a two-dimensional array that consists of rows andcolumns. A row represents an entity stored in a table and it is defined using columns. Anexample of a row might be the sale of an item and its columns include the UPC, adescription and the quantity sold. Any action a user requests must also go through a security check to validate their privilegesas defined by the database administrator. Once their authorization at the object level isverified, the PE will verify that the columns requested actually exist within the objectsreferenced.Next, the PE optimizes the SQL to create an execution plan that is as efficient as possiblebased on the amount of data in each table, the indices defined, the type of indices, theselectivity level of the indices, and the number of processing steps needed to retrieve thedata. The PE is responsible for passing the optimized execution plan to other componentsas the best way to gather the data.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->