Oracle Database 10g: Introduction To SQL
Duration
Five Days
Part I (3 days)
Objectives of this Course
This course is a common starting point in the 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.
Target Audience
The target audience for this course is all Oracle professionals, both business and systems professionals. Among the specific groups for whom this course will be helpful are:
- Application designers and developers.
- Database administrators.
- Business users and non-technical end users.
Course Prerequisites
No mandatory prerequisites exist for this course. However, one or more of the following courses are suggested prerequisites:
- Advanced Technology Tour
- Oracle Designer Data Modeling
Certification Examination
Tests for the Oracle Certified Professional (OCP) and other related programs are administered by Sylvan Prometric, Inc. This course considers subjects included within "Exam 1Z1-042: Oracle Database 10g: Administration I". In addition to this course book, the following course books are also required to prepare for this certification test:
- The companion volume Oracle Database 10g: Introduction to SQL - Part II
- Oracel Database 10g: Administration I
Following the training sessions Oracle Corporation recommends six-months production experience with the technology prior to taking the certification examinations. While this is good practice it may not be necessary for all individuals.
Course Outline
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 II (3 days)
Objectives Of This Course
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.
Target Audience
The target audience for this course is all Oracle professionals. Further, this course is well suited for non-Oracle professionals already experienced in the SQL but who wish to become acquainted with the unique and advanced features of Oracle SQL. Among the specific groups for whom this course will be helpful are application developers and database administrators.
Pre-requisites
ORACLE DATABASE 10G: INTRODUCTION TO SQL –PART I, SECOND EDITION
Certification Examination
Tests for the Oracle Certified Professional (OCP) and other related programs are administered by Sylvan Prometric, Inc. This course considers subjects included within "Exam 1Z1-042: Oracle Database 10g: Administration I". In addition to the prerequisite course book, the course ORACLE DATABASE 10G: ADMINISTRATION I is also required to prepare for this certification test. Following the training sessions Oracle Corporation recommends six-month production experience with the technology prior to taking the certification examinations. While this is good practice it may not be necessary for all individuals.
Instructor Notes
This volume considers some relatively advanced features of the Oracle SQL language. For students being introduced to the SQL language for the first time, this volume is usually considered within the same 5-day presentation as the prerequisite textbook ORACLE DATABASE 10G: INTRODUCTION TO SQL – PART I. Note also that this volume could potentially also be used as a standalone 3-day presentation for students who are already experienced with the SQL language and would like to focus on the more advanced features of the language, or for those students who wish to learn the SQL language in two segments rather than one contiguous presentation.
If any students have not recently attended the prerequisite course ORACLE DATABASE 10G: INTRODUCTION TO SQL – PART I be sure that they spend sufficient time in reviewing the enclosed ELECTRONICS database logical data model since this course refers to that data model occasionally in addition to using this course's primary COMPANY data model.
Course Outline
SQL99 JOIN TECHNIQUES
- CROSS JOINS
- NATURAL JOIN
- INNER JOIN
- 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