0% found this document useful (0 votes)
5 views6 pages

Final SQL Handbook

The document provides an overview of SQL, which stands for Structured Query Language, and its core uses in data extraction, modification, and database management. It covers key topics including relational database management systems, core SQL command categories, schema creation, and basic querying techniques. Additionally, it highlights best practices for writing SQL and discusses market trends and career outlook for SQL skills.

Uploaded by

sivach7997
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views6 pages

Final SQL Handbook

The document provides an overview of SQL, which stands for Structured Query Language, and its core uses in data extraction, modification, and database management. It covers key topics including relational database management systems, core SQL command categories, schema creation, and basic querying techniques. Additionally, it highlights best practices for writing SQL and discusses market trends and career outlook for SQL skills.

Uploaded by

sivach7997
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

The Foundations of SQL

MASTERCLASS PRESENTATION COMPANION

SLIDE 1
What SQL Stands For & Core Uses

• SQL Definition: SQL stands for Structured Query Language.

• Data Extraction: Allows users to query and pull specific information out of massive data pools
instantly.

• Data Modification: Used to update, insert, and safely remove records within structured data
systems.

• Database Management: Enables developers to build, configure, change, and control user access
to complete relational table systems.

SLIDE 2
What We Will Cover Today

• What is SQL and why do we need it?

• Relational Database Management Systems (RDBMS)

• Core SQL Command Categories (DDL, DML, DQL, DCL)

• Schema Creation & Permission Structuring

• Basic Queries & Filters (`SELECT`, `WHERE`)

SLIDE 3
Understanding SQL

• SQL stands for Structured Query Language.

• It is the absolute standard language used to communicate with database architectures.

• Enables users to seamlessly create, read, update, and remove data structures.

• Invented in the 1970s at IBM, it remains the modern backbone of data manipulation.
SLIDE 4
Relational Database Management Systems (RDBMS)

• An RDBMS is the specialized software environment built to manage a relational database.

• Information is strictly organized into clean tables containing cross-referenced rows and columns.

• Industry Leaders: MySQL, PostgreSQL, Microsoft SQL Server, and Oracle.

SLIDE 5
Anatomy of a Database Table

• Rows (Records): Represent single unique elements inside a list.

• Columns (Attributes): Hold specified definitions of properties.

• Primary Key: A totally unique tracker column used to ensure no two records collide.

SLIDE 6
The 4 Core Categories of SQL Commands

Category Full Name Primary Usage

DDL Data Definition Language Defines the schema structure (`CREATE`, `DROP`)

DML Data Manipulation Language Alters records directly (`INSERT`, `UPDATE`)

DQL Data Query Language Fetches data upon request (`SELECT`)

DCL Data Control Language Manages system security rights (`GRANT`)

SLIDE 7
DDL – Creating and Altering Tables

• Used to construct clean schemas before any raw records arrive.

CREATE TABLE employees (


emp_id INT PRIMARY KEY,
first_name VARCHAR(50),
salary DECIMAL(10, 2)
);
SLIDE 8
Understanding Schemas & Permissions

• What is a Schema? A collection of database objects (tables, views, indexes). Schema objects are
logical structures created by users and manipulated with SQL.

• User Creation & Base Configuration:

CREATE USER AR_MURTHY IDENTIFIED BY ACR143


DEFAULT TABLESPACE RAMANA_DEFAULT
TEMPORARY TABLESPACE RAMANA_TEMPORARY;

• Granting & Revoking Administrative Rights:

GRANT CONNECT, DBA TO AR_MURTHY;


GRANT READ, WRITE ON DIRECTORY DATA_PUMP_DIR TO AR_MURTHY;
REVOKE READ, WRITE ON DIRECTORY DATA_PUMP_DIR FROM AR_MURTHY;

SLIDE 9
Schema Creation: Roles & Key Privileges

• Role-Based Access Control (RBAC): Grouping permissions into roles simplifies administration.

CREATE ROLE EQUITAS_MERCHANT;


GRANT CONNECT, CREATE TABLE, CREATE SYNONYM, CREATE PUBLIC SYNONYM,
CREATE PROCEDURE, CREATE TRIGGER TO EQUITAS_MERCHANT;
GRANT EQUITAS_MERCHANT TO RBL_PROJECT;

CRITICAL DESIGN NOTES:


1. SYSDBA Authority: If you want to provision permissions for any schema, assignments must be executed
strictly from the SYSDBA administrative layer.
2. Trigger Privilege Isolation: Granting CREATE PROCEDURE covers procedures, functions, packages, and
views, but database triggers must be called out explicitly.

SLIDE 10
DML – Adding and Modifying Data

• Populates, edits, and purges operational rows from defined setups.

-- Insert a record
INSERT INTO employees VALUES (1, 'Alice', 75000.00);

-- Update an attribute
UPDATE employees SET salary = 80000.00 WHERE emp_id = 1;
SLIDE 11
DQL – The SELECT Statement

• The fundamental driving engine of database reporting workflows.

SELECT first_name, salary


FROM employees;

QUERY RESULT OUTPUT:

first_name salary

Alice 80000.00

Bob 62000.00

Charlie 95000.00

SLIDE 12
Filtering Data with WHERE

• Applies logic restrictions to narrow down broad results.

SELECT * FROM employees


WHERE salary > 70000
AND first_name LIKE 'A%';

QUERY RESULT OUTPUT:

emp_id first_name salary

1 Alice 80000.00
SLIDE 13
Sorting and Limiting Results

• Organizes outputs into ordered schedules, reducing network transfer sizes.

SELECT * FROM employees


ORDER BY salary DESC
LIMIT 2;

QUERY RESULT OUTPUT:

emp_id first_name salary

3 Charlie 95000.00

1 Alice 80000.00

SLIDE 14
Basic Aggregations

• Math components calculated directly on processing server hardware engines.

SELECT COUNT(*), AVG(salary)


FROM employees;

QUERY RESULT OUTPUT:

COUNT(*) AVG(salary)

3 79000.00

SLIDE 15
Best Practices for Writing Clean SQL

• Keyword Capitalization: Keep core commands uppercase.

• Safety Measures: Never fire an UPDATE or DELETE statement without validating your WHERE
condition.

• Optimization: Only pull individual target column headers instead of using SELECT *.
SLIDE 16
Market Trends & Career Outlook

• Consistently cataloged as a top-three most demanded engineering language skill across the globe.

• Forms the fundamental underlying tool for Business Intelligence analysts, software architects, and
data processing professionals everywhere.

SQL Foundations Masterclass Presentation Companion

You might also like