Oracle Database 10g:

Introduction to SQL

Course Outline

Duration: 5 Days

Objectives:

Part 1:

This course is a common starting point in the Sideris Oracle database curriculum for administrators, developers and business users. The objective of this course is to provide an introduction to the SQL database language within the context of an Oracle database.

Specific subject areas to be explored and objectives to be reached are:

• A summation of relational database principles and an introduction to the Oracle relational database server.
• Using the iSQL*Plus web-based database interface and other traditional interfaces.
• Writing simple SQL queries and moderately complex SQL queries using various join techniques.
• Summarizing, grouping and sorting data.
• Advanced query techniques such as correlated subqueries.
• Developing simple SQL*Plus reports.
• Creating and maintaining database tables.
• Taking advantage of new features such as the use of regular expressions.
• Moving beyond basic table definitions, consideration of defining the full range of database objects, such as advanced table definitions, indexes, sequences, views and others.
• Understanding basic database security and object privileges.
• Using the powerful set of built-in SQL functions.
• Protecting the database and extending the basic data model using declarative constraints.
• Performing advanced SQL queries such as grouping and cube operations and SQL99 join syntax.
• Developing complex SQL*Plus reports and using SQL*Plus scripts.


Part 2:


The primary objective of this course is to consider advanced subjects and techniques pertaining to the SQL database language. Even professionals experienced in other implementations of the industry-standard SQL language will benefit from the advanced and Oracle-specific features of SQL discussed in this course. Major subject areas to be explored are:
• Learn to use the SQL99 join syntax. Also, performing advanced SQL queries using techniques such as grouping and cube operations.
• Moving beyond basic table definitions, consideration of defining the full range of database objects, such as advanced table definitions, indexes, sequences, views and others.
• Understanding basic database security and object privileges.
• Using the powerful set of built-in SQL functions.
• Protecting the database and extending the basic data model using declarative constraints.
• Developing complex SQL*Plus reports and using SQL*Plus scripts



Course Content:

 


Part 1:


RELATIONAL DATABASES & SQL
• ABOUT RELATIONAL DATABASES
• ELEMENTS OF SQL

USING SQL*PLUS
• ABOUT SQL*PLUS
• USING THE MS WINDOWS SQL*PLUS TOOL
• USING THE ISQL*PLUS WEB TOOL
• ENTERING COMMANDS & SYNTAX

BUILDING A SELECT STATEMENT
• ABOUT THE SELECT STATEMENT
• SELECTING COLUMNS
• USING ALIAS NAMES

BUILDING A WHERE CLAUSE
• ABOUT LOGICAL OPERATORS
• EQUALITY OPERATOR
• BOOLEAN OPERATORS
• NULL & BETWEEN OPERATORS
• FINDING TEXT STRINGS
• IN OPERATOR

ORDERING THE RESULT TABLE
• ABOUT THE ORDER BY CLAUSE
• MULTIPLE COLUMN SORTS
• SPECIFYING THE SORT SEQUENCE
• ABOUT NULL VALUES WITHIN SORTS
• USING COLUMN ALIASES

PSEUDO COLUMNS & FUNCTIONS
• ABOUT PSEUDO COLUMNS & FUNCTIONS
• USING ROWID
• USING ROWNUM
• USING THE FUNCTIONS
• USING THE DUAL TABLE
• SESSIONTIMEZONE FUNCTION

JOINING TABLES
• ABOUT JOINS
• INNER JOIN
• REFLEXIVE JOIN
• NON-KEY JOIN
• OUTER JOIN

USING SET OPERATORS
• ABOUT THE SET OPERATORS
• SET OPERATOR EXAMPLES

SUMMARY FUNCTIONS
• ABOUT SUMMARY FUNCTIONS
• SUMMARY FUNCTIONS WITH DISTINCT

USING SUBQUERIES
• ABOUT SUBQUERIES
• STANDARD SUBQUERIES
• CORRELATED SUBQUERIES

CREATING & SELECTING GROUPS
• ABOUT SUMMARY GROUPS
• FINDING GROUPS WITHIN THE BASE TABLES
• SELECTING DATA FROM THE BASE TABLES
• SELECTING GROUPS FROM THE RESULT TABLE

SQL*PLUS COMMANDS
• ABOUT SQL*PLUS COMMANDS
• MORE ABOUT SCRIPT FILES
• INVOKING OPERATING SYSTEM COMMANDS
• SAVING SESSION OUTPUT

BUILD SIMPLE SQL*PLUS REPORTS
• ABOUT THE SQL*PLUS REPORT FEATURES
• SESSION OUTPUT WITH SET
• FORMAT COLUMN OUTPUT WITH COLUMN
• DEFINING REPORT BREAKS WITH BREAK
• PRODUCE SUBTOTALS WITH COMPUTE

SQL DATA DEFINITION LANGUAGE
• ABOUT SQL DDL
• CREATE TABLE STATEMENT
• ALTER TABLE STATEMENT
• DROP TABLE STATEMENT
• SUPPORTIVE STATEMENTS

SQL DATA MANIPULATION LANGUAGE
• ABOUT SQL DML
• ABOUT THE INSERT STATEMENT
• ABOUT THE DELETE STATEMENT
• ABOUT THE UPDATE STATEMENT
• ABOUT TRANSACTIONS
• TRUNCATE TABLE
• COMPLEX TABLE REFERENCES


Part 2:


SQL99 JOIN TECHNIQUES
• CROSS JOINS
• NATURAL JOINS
• INNER JOINS
• OUTER JOINS
• ANTI JOINS
• USING NAMED SUBQUERIES

ENHANCING GROUPS WITH ROLLUP & CUBE

USING THE CASE EXPRESSION

SQL FUNCTIONS: CHARACTER
• WHAT ARE THE SQL FUNCTIONS?
• CHARACTER FUNCTIONS
• About GREATEST(), LEAST()

SQL FUNCTIONS: NUMERIC

SQL FUNCTIONS: DATE
• DATE FORMAT FUNCTIONS
• DATE ARITHMETIC FUNCTIONS

DATABASE OBJECTS: RELATIONAL VIEWS
• ABOUT RELATIONAL VIEWS
• UPDATING VIEW DATA
• MAINTAINING VIEW DEFINITIONS
• ALTER VIEW
• DROP VIEW

DATABASE OBJECTS: DATA DICTIONARY STORAGE
• USER_UPDATABLE_COLUMNS
• UNDERSTANDING THE DATA DICTIONARY STRUCTURE

DATABASE OBJECTS: INDEXES
• ABOUT INDEXES
• USE B-TREE INDEXES


DATABASE OBJECTS: OTHER OBJECTS
• CREATING AN APPLICATION SCHEMA
• MORE ABOUT CREATING TABLES
• DEFINING SEQUENCES
• ALTER SEQUENCE & DROP SEQUENCE
• ALTER SEQUENCE
• DROP SEQUENCE
• ABOUT SYNONYMS
• DROP SYNONYM
• CREATE SCHEMA AUTHORIZATION

DATABASE OBJECTS: SECURITY
• USER ID PASSWORDS
• OBJECT SECURITY

DATA INTEGRITY USING CONSTRAINTS
• NOT NULL CONSTRAINT
• CHECK CONSTRAINT
• UNIQUE CONSTRAINT
• PRIMARY KEY CONSTRAINT
• REFERENCES CONSTRAINT

MANAGING CONSTRAINT DEFINITIONS
• MANAGING CONSTRAINTS
• RENAMING & DROPPING CONSTRAINTS
• ENABLING & DISABLING CONSTRAINTS
• DEFERRED ENFORCEMENT
• SET CONSTRAINTS
• HANDLING CONSTRAINT EXCEPTIONS
• DATA DICTIONARY STORAGE

OPTIONAL – ADVANCED SQL*PLUS REPORTS
• BREAK
• COMPUTE
• COLUMN
• TTITLE & BTITLE

OPTIONAL – BUILDING SQL*PLUS SCRIPTS
• USING SQL*PLUS VARIABLES
• DEFINE & UNDEFINE
• ACCEPT
• PROMPT
• PAUSE