Day 1 - Introduction to SQL &
Teradata Architecture
• Course Duration: 10 Days
• Today: Introduction to SQL & Teradata
Architecture
• Instructor: [Your Name]
What is SQL?
• • SQL = Structured Query Language
• • Used for storing, manipulating, and
retrieving data
• • Standard for relational databases
Why Learn SQL?
• • Universal in Data Industry
• • Works with major RDBMS: MySQL,
PostgreSQL, Oracle, SQL Server, Teradata
• • Core skill in Banking, Data Analysis, IT
Development
What is a Relational Database?
• • Organizes data into tables (rows & columns)
• • Tables relate to each other using keys
• • Example: Customers, Accounts, Transactions
Key Database Terms
• Table: Collection of related data (like a sheet)
• Row: A record or entry
• Column: Attribute or field
• Primary Key: Unique identifier for rows
• Foreign Key: References primary key of
another table
Types of SQL Commands
• DDL: CREATE, DROP, ALTER
• DML: INSERT, UPDATE, DELETE
• DQL: SELECT
• TCL: COMMIT, ROLLBACK
• DCL: GRANT, REVOKE
SQL Query Lifecycle in Teradata
• 1. User submits SQL query
• 2. Goes to Teradata Gateway
• 3. Parsing Engine (PE) processes it
• 4. BYNET sends it to AMPs
• 5. AMPs fetch/process data
• 6. Results go back via BYNET to PE
• 7. User gets the result
Teradata Architecture Components
• • Parsing Engine (PE): Parses & optimizes SQL
• • BYNET: High-speed messaging layer
• • AMP (Access Module Processor): Executes
query on data slice
• • VDisks: Physical data storage for AMPs
• • Nodes: Physical machines in Teradata
Diagram - Teradata SQL
Architecture
• [Client (SQL)] ↓
• [Gateway] ↓
• [Parsing Engine] ↓
• BYNET
• ↓ ↓ ↓
• [AMP1] [AMP2] [AMP3]
• ↓ ↓ ↓
• [Disk] [Disk] [Disk]
Hands-on SQL
• Create a simple table:
• CREATE TABLE customers (
• customer_id INT PRIMARY KEY,
• name VARCHAR(50),
• dob DATE,
• city VARCHAR(30)
• );
Homework/Assignment
• • Create a table 'branches' (branch_id,
branch_name, IFSC, city)
• • Insert 2 rows
• • Run a basic SELECT query
Summary of Day 1
• • SQL = language for managing RDBMS
• • Teradata has a parallel, scalable architecture
• • Query lifecycle: PE → BYNET → AMP → PE
• • Practiced basic table creation
What's Next (Day 2)
• • SELECT statements
• • Filtering data with WHERE
• • DISTINCT, LIKE, BETWEEN