D80198GC10 Oracle Database 12c SQL and Fundamentals Summary Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff Level Professional Delivery Method Instructor-led (Classroom) Technology Oracle Database 12c Training Credits / Vouchers Yes Introduction This five-day instructor led course is a bundled course thqat consists of Oracle Database: SQL Workshop I and Oracle Database: Fundamentals and will teach you the fundamentals of SQL and along with the benefits of the programming languages using Oracle Database technology. You'll explore the concepts of relational databases. Prerequisites Before attending this course, students must have: A familiarity with data processing concepts and techniques Master basic application features such as Open, Save, Close A proficiency with the use of a keyboard and mouse At Course completion After completing this course, students will be able to: Write queries against single and multiple tables, manipulate data in tables and create database objects. Use single row functions to customize output. Invoke conversion functions and conditional expressions. Use group functions to report aggregated data. Create blocks of application code that can be shared by multiple forms, reports and data management applications. Develop anonymous blocks, stored procedures and functions. Declare identifiers and trap exceptions. Use DML statements to manage data. Use DDL statements to manage database objects. Declare Variables. Conditionally control code flow (loops, control structures). Describe stored procedures and functions. Retrieve row and column data from tables.
Course Content SQL FUNDAMENTALS I Lesson 1: Introduction This lesson provides an overview of Relational Database Management Systems and the development environments used for creating and executing SQL statements. Course objectives, agenda, and appendixes used in the course Overview of Oracle Database 12c and related products Overview of relational database management concepts and terminologies Introduction to SQL and its development environments The Human Resource(HR) Schema and the tables used in the Course Start Oracle SQL Developer and create a new connection to the ora1 account. Use Oracle SQL Developer to examine the data objects in the ora1 account. The ora1 account contains the HR schema tables. Lesson 2: Retrieving Data Using the SQL SELECT Statement This lesson describes the capabilities of the SQL SELECT statement, and how to execute a basic SELECT statement. Basic SELECT statement Arithmetic expressions and NULL values in the SELECT statement Column Aliases Use of concatenation and alternative quote operators, literal character strings and the DISTINCT keyword Using the DESCRIBE command Selecting all data from different tables Describing the structure of tables Performing arithmetic calculations and specifying column names Lesson 3: Restricting and Sorting Data This lesson explains the use of operators to limit and sort the rows returned by a query. It also describes the use of ampersand substitution variables to restrict and sort output at run time. Limiting rows with the WHERE clause, comparison conditions, the NULL and logical operators Rules of precedence for operators in an expression Sorting rows using the ORDER BY clause SQL row limiting clause in a query Using Substitution Variables Using the DEFINE and VERIFY commands Selecting data and changing the order of the rows that are displayed Restricting rows by using the WHERE clause Sorting rows by using the ORDER BY clause Using substitution variables to add flexibility to your SQL SELECT statements Lesson 4: Using Single-Row Functions to Customize Output This lesson describes the nature of various types of functions available in the SQL language. It also demonstrates the use of character, number and date functions in SELECT statements. Single-row SQL functions Character functions Number functions Working with dates Date functions Writing a query that displays the current date Creating queries that require the use of numeric, character, and date functions Performing calculations of years and months of service for an employee Lesson 5: Using Conversion Functions and Conditional Expressions This lesson describes the use of various types of conversion functions available in SQL. It also demonstrates the use of the TO_CHAR, TO_NUMBER and TO_DATE functions and how to apply conditional expressions in a SELECT statement. Implicit and explicit data type conversion TO_CHAR, TO_DATE, TO_NUMBER functions Nesting functions General functions: o NVL o NVL2
o NULLIF o COALESCE Conditional expressions o CASE o DECODE Creating queries that use TO_CHAR, TO_DATE, and other DATE functions Creating queries that use conditional expressions such as DECODE and CASE Lesson 6: Reporting Aggregated Data Using the Group Functions This lesson explains the use of group functions in obtaining summary information for groups of rows. It also discusses how to group rows into smaller sets and how to specify search criteria for groups of rows. Group functions o Types and syntax o Use AVG, SUM, MIN, MAX, COUNT o Use the DISTINCT keyword within group functions o NULL values in a group function Grouping rows o GROUP BY clause o HAVING clause Nesting group functions Writing queries that use the group functions Grouping by rows to achieve more than one result Restricting groups by using the HAVING clause Lesson 7: Displaying Data from Multiple Tables Using Joins This lesson explains how to obtain data from multiple tables through the use of joins. It demonstrates the use of equijoins, nonequijoins, selfjoins, outer joins in SELECT statements as well as the generation of Cartesian products with a cross join. Types of JOINS and its syntax Natural join o USING clause o ON clause Self-join Nonequijoins OUTER join o LEFT OUTER join o RIGHT OUTER join o FULL OUTER join Cartesian product o Cross join Joining tables using an equijoin Performing outer and self-joins Adding conditions Lesson 8: Using Subqueries to Solve Queries This lesson describes the use of subqueries in SQL statements as well as the different types and the types of problems that can be solved. Subquery types, syntax, and guidelines Single-row subqueries o Group functions in a subquery o HAVING clause with subqueries Multiple-row subqueries o Use ALL or ANY operator o Using the EXISTS operator Null values in a subquery Creating subqueries to query values based on unknown criteria Using subqueries to find out the values that exist in one set of data and not in another Lesson 9: Using the Set Operators This lesson demonstrates the use of set operators to combine or compare the results of many individual queries into a single result. Set Operators: Types and guidelines UNION and UNION ALL operator INTERSECT operator MINUS operator Matching the SELECT statements Using the ORDER BY clause in set operations Create reports by making us of: The UNION operator The INTERSECT operator The MINUS operator Lesson 10: Manipulating Data This lesson describes the use of each of the data manipulation statements. It also demonstrates how to insert, update and delete table data and how to control database transactions. Adding new rows in a table o INSERT statement Changing data in a table o UPDATE statement Removing rows from a table o DELETE statement o TRUNCATE statement Database transactions control using COMMIT, ROLLBACK and SAVEPOINT Read consistency FOR UPDATE clause in a SELECT statement
Inserting rows into the tables Updating and deleting rows in the table Controlling transactions Lesson 11: Introductions to Data Definition Language This lesson explains the use of data definition language (DDL) statements to create, alter and remove simple tables. It also shows the column data types available in DDL and introduces database schema concepts as well as table and column constraints. Database objects o Naming rules CREATE TABLE statement o Access another user s tables o DEFAULT option Data types Overview of the NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY and CHECK constraints Creating a table using a subquery ALTER TABLE o Read-only tables DROP TABLE statement Creating new tables Creating a new table by using the CREATE TABLE AS syntax Verifying that tables exist Altering tables Adding columns Dropping columns Setting a table to readonly status Dropping tables Fundamentals Lesson 1: Introduction This lesson provides an overview of the database schema and tables used in the course as well as a review of the basic concepts of the SQL language. Course objectives and course agenda The database schema, the appendixes and practices, and development environments used in this course Identify the available user interface environments that can be used for the course Describe the salient features of Oracle Cloud Reference the available appendixes, documentation and other resources Start Oracle SQL Developer and create a new connection to the ora1 account. Use Oracle SQL Developer to examine the data objects in the ora1 account. The ora1 account contains the HR schema tables. Lesson 2: Introduction to This lesson introduces and the programming constructs. You also learn about the benefits of. Explain the need for Explain the benefits of Identify the different types of blocks Output messages in Introduction to Lesson 3: Declaring Variables This lesson describes the techniques involved in declaring, initializing and using variables in code. Recognize valid and invalid identifiers List the uses of variables Declare and initialize variables List and describe various data types Identify the benefits of using the %TYPE attribute Declare, use, and print bind variables Declaring Variables Lesson 4: Writing Executable Statements In this lesson, you learn how lexical units make up a block. You learn to write nested blocks. You also learn about the scope and visibility of variables in nested blocks and about qualifying variables with labels. Identify lexical units in a block Use built-in SQL functions in Describe when implicit conversions take place and when explicit conversions have to be dealt with Write nested blocks and qualify variables with labels Write readable code with appropriate indentation Use sequences in expressions Writing Executable Statements
Lesson 5: Using SQL Statements within a Block In this lesson, you learn to embed standard SQL SELECT, INSERT, UPDATE, DELETE, and MERGE statements in blocks. You learn how to include data manipulation language (DML) and transaction control statements in. You learn the need for cursors and differentiate between the two types of cursors. The lesson also presents the various SQL cursor attributes that can be used with implicit cursors. Determine the SQL statements that can be directly included in a executable block Manipulate data with DML statements in Use transaction control statements in Make use of the INTO clause to hold the values returned by a SQL statement Differentiate between implicit cursors and explicit cursors Use SQL cursor attributes Using SQL Statements Within a Lesson 6: Writing Control Structures In this lesson, you learn how to use control structures such as IF statements, CASE expressions, and LOOP structures in a block. Identify the uses and types of control structures Construct an IF statement Use CASE statements and CASE expressions Construct and identify loop statements Use guidelines when using conditional control structures Writing Control Structures Lesson 7: Working with Composite Data Types You have already been introduced to composite data types. In this lesson, you learn more about composite data types and their uses. Describe collections and records Create user-defined records Create a record with the %ROWTYPE attribute Create associative arrays o INDEX BY table o INDEX BY table of records Working with Composite Data Types Lesson 8: Using Explicit Cursors In this lesson, you learn about explicit cursors. You learn to differentiate between implicit and explicit cursors. You also learn to declare and control simple cursors, as well as cursors with parameters. Distinguish between implicit and explicit cursors Discuss the reasons for using explicit cursors Declare and control explicit cursors Use simple loops and cursor FOR loops to fetch data Declare and use cursors with parameters Lock rows with the FOR UPDATE clause Reference the current row with the WHERE CURRENT OF clause Using Explicit Cursors Lesson 9: Handling Exceptions In this lesson, you learn how to deal with run-time errors in the block. Define exceptions Recognize unhandled exceptions List and use different types of exception handlers Trap unanticipated errors Describe the effect of exception propagation in nested blocks Customize exception messages Handling Predefined Exceptions Handling Standard Oracle Server Exceptions Lesson 10: Introducing Stored Procedures and Functions This lesson introduces you to named blocks, which are also called subprograms. Procedures and functions are subprograms. In the lesson, you learn to differentiate between anonymous blocks and subprograms. Differentiate between anonymous blocks and subprograms
Create a simple procedure and invoke it from an anonymous block Create a simple function Create a simple function that accepts a parameter Differentiate between procedures and functions Creating and Using Stored Procedures Associated Certifications & Exam This course prepares students to write Exam(s): 1Z0-051 Oracle Database 11g SQL Fundamentals 1Z0-061 Oracle Database 12c SQL Fundamentals Accredited to certification(s): Oracle Database 10g Administrator Certified Associate Oracle Database 11g Administrator Certified Associate Oracle Database 12c Administrator Certified Associate Oracle Developer Certified Associate