D64260GC11_les01

download D64260GC11_les01

of 23

Transcript of D64260GC11_les01

  • 7/25/2019 D64260GC11_les01

    1/23

    1Copyright 2011, Oracle and/or its affiliates. All rights reserved.

    Introduction

  • 7/25/2019 D64260GC11_les01

    2/23

    Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 2

    Lesson Objectives

    After completing this lesson, you should e ale to do thefollo!ing"

    # $iscuss the goals of the course

    # $escrie the dataase schema and tales that are used in

    the course# %dentify the availale environments that can e used in the

    course

    # &evie! some of the asic concepts of '()

  • 7/25/2019 D64260GC11_les01

    3/23

    Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - *

    Lesson Agenda

    # Course o+ectives and course agenda# he dataase schema and appendies used in the course

    and the availale development environment in this course

    # &evie! of some asic concepts of '()

    # Oracle $ataase 11gdocumentation and additionalresources

  • 7/25/2019 D64260GC11_les01

    4/23

    Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 -

    Course Objectives

    After completing this course, you should e ale to do thefollo!ing"

    # Control dataase access to specific o+ects

    # Add ne! users !ith different levels of access privileges

    # anage schema o+ects# anage o+ects !ith data dictionary vie!s

    # anipulate large data sets in the Oracle dataase y using

    suueries

    # anage data in different time ones# rite multiple-column suueries

    # 3se scalar and correlated suueries

    # 3se the regular epression support in '()

  • 7/25/2019 D64260GC11_les01

    5/23

    Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 4

    Course Prerequisites

    he Oracle Database: SQL Fundamentals Icourse is aprereuisite for this course.

  • 7/25/2019 D64260GC11_les01

    6/23

    Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 5

    Course Agenda

    # $ay 1"6 %ntroduction

    6 Controlling 3ser Access

    6 anaging 'chema O+ects

    6 anaging O+ects !ith $ata $ictionary 7ie!s# $ay 2"

    6 anipulating )arge $ata 'ets

    6 anaging $ata in $ifferent ime 8ones

    6 &etrieving $ata y 3sing 'uueries

    6 &egular 9pression 'upport

  • 7/25/2019 D64260GC11_les01

    7/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - :

    Lesson Agenda

    # Course o+ectives and course agenda# he dataase schema and appendies used in the course

    and the availale development environment in this course

    # &evie! of some asic concepts of '()

    # Oracle $ataase 11gdocumentation and additionalresources

  • 7/25/2019 D64260GC11_les01

    8/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - ;

    Tables Used in This Course

    ?%'O&@employee>id

    start>date

    end>date

    +o>id

    department>id

    $9A&9B'department>id

    department>namemanager>idlocation>id

    )OCA%OB'location>id

    street>addresspostal>code

    citystate>province

    country>id

    idfirst>namelast>name

    emailphone>numer

    hire>date+o>idsalary

    commission>pctmanager>id

    department>id

    CO3B&%9'country>id

    country>nameregion>id

    &9%OB'region>id

    region>name&A$9'grade>level

    lo!est>sal

    highest>sal

  • 7/25/2019 D64260GC11_les01

    9/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 10

    Appendixes and Practices Used in the Course

    # Appendi A" ale $escriptions# Appendi =" 3sing '() $eveloper

    # Appendi C" 3sing '()Dlus

    # Appendi $" 3sing

  • 7/25/2019 D64260GC11_les01

    10/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 11

    Development nvironments

    here are t!o development environments for this course"# he primary tool is Oracle '() $eveloper.

    # @ou can also use '()Dlus command-line interface.

    '() $eveloper '() Dlus

  • 7/25/2019 D64260GC11_les01

    11/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 12

    Lesson Agenda

    # Course o+ectives and course agenda# he dataase schema and appendies used in the course

    and the availale development environment in this course

    # &evie! of some asic concepts of '()

    # Oracle $ataase 11gdocumentation and additionalresources

  • 7/25/2019 D64260GC11_les01

    12/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 1*

    !evie" o# !estricting Data

    # &estrict the ro!s that are returned y using the WHEREclause.

    # 3se comparison conditions to compare one epression !ith

    another value or epression.

    # 3se logical conditions to comine the result of t!o

    component conditions and produce a single result ased on

    those conditions.

    Operator eaning

    BETWEEN...AND...

    =et!een t!o values FinclusiveG

    IN(set) atch any of a list of values

    LIKE atch a character pattern

  • 7/25/2019 D64260GC11_les01

    13/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 1

    !evie" o# $orting Data

    # 'ort retrieved ro!s !ith the ORDERBYclause"6 ASC" Ascending order, default

    6 DESC" $escending order

    # he ORDERBYclause comes last in the SELECTstatement"

    SELECT last_name, jo_!", "e#a$tment_!", %!$e_"ate

    &RO' em#loees

    ORDER BY %!$e_"ate

    H

  • 7/25/2019 D64260GC11_les01

    14/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 14

    !evie" o# $%L &unctions

    'ingle-ro!

    functions

    ultiple-ro!

    functions

    &eturn one result

    per ro!

    &eturn one result

    per set of ro!s

    Eunctions

  • 7/25/2019 D64260GC11_les01

    15/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 15

    !evie" o# $ingle'!o" &unctions

    Conversion $ate

    Bumer'ingle-ro!functions

    eneral

    Character

  • 7/25/2019 D64260GC11_les01

    16/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 1:

    !evie" o# T(pes o# )roup &unctions

    # A*+# CONT

    # 'A-

    # 'IN

    # STDDE*# S'

    # *ARIANCE

    roup

    functions

  • 7/25/2019 D64260GC11_les01

    17/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 1;

    !evie" o# Using $ubqueries

    # A suuery is a SELECTstatement nested in a clause ofanother SELECTstatement.

    # 'ynta"

    # ypes of suueries"

    $ingle'ro" subquer( *ultiple'ro" subquer(

    &eturns only one ro! &eturns more than one ro!

    3ses single-ro! comparisonoperators

    3ses multiple-ro! comparisonoperators

    SELECT selet_l!st

    &RO' tale

    WHERE e/#$ o#e$ato$ (SELECT selet_l!st

    &RO' tale )

  • 7/25/2019 D64260GC11_les01

    18/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 20

    !evie" o# *anipulating Data

    A data manipulation language F$)G statement is eecuted!hen you"

    # Add ne! ro!s to a tale

    # odify eisting ro!s in a tale

    # &emove eisting ro!s from a tale

    &unction Description

    INSERT Adds a ne! ro! to the tale

    0DATE odifies eisting ro!s in the tale

    DELETE &emoves eisting ro!s from the tale

    'ER+E 3pdates, inserts, or deletes a ro! conditionally

    into/from a tale

  • 7/25/2019 D64260GC11_les01

    19/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 22

    Lesson Agenda

    # Course o+ectives and course agenda# he dataase schema and appendies used in the course

    and the availale development environment in this course

    # &evie! of some asic concepts of '()

    # Oracle $ataase 11gdocumentation and additionalresources

  • 7/25/2019 D64260GC11_les01

    20/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 2*

    Oracle Database $%L Documentation

    # Oracle Database New Features Guide# Oracle Database Reference

    # Oracle Database SQL Language Reference

    # Oracle Database Concepts

    # Oracle Database SQL Deeloper !ser"s Guide Release#$%

  • 7/25/2019 D64260GC11_les01

    21/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 2

    Additional !esources

    Eor additional information aout the ne! Oracle 11g '(), referto the follo!ing"

    # Oracle Database %%g: New Features eStudies

    # Oracle b& '(ample series )O*'+: Oracle Database %%g

  • 7/25/2019 D64260GC11_les01

    22/23Copyright 2011, Oracle and/or its affiliates. All rights reserved.1 - 24

    $ummar(

    %n this lesson, you should have learned the follo!ing"# he course o+ectives

    # he sample tales used in the course

  • 7/25/2019 D64260GC11_les01

    23/23

    Practice +, Overvie"

    his practice covers the follo!ing topics"# &unning the '() $eveloper online tutorial

    # 'tarting '() $eveloper and creating a ne! dataase

    connection and ro!sing the tales

    # 9ecuting '() statements using the '() orIsheet# &evie!ing the asic concepts of '()