Software License Agreement: Terms and ConditionsThe media and/or any online materials accompanying this book that are available now or in the future contain programs and/or text files th
Trang 1OCP: Oracle8i DBA SQL and PL/SQL Study Guide
Copyright ©2000 SYBEX , Inc., Alameda, CA www.sybex.com
Trang 2OCP: Oracle8i™ DBA SQL and PL/SQL Study Guide
Chip Dawes Biju Thomas
Trang 3Associate Publisher: Richard Mills
Contracts and Licensing Manager: Kristine O’Callaghan
Acquisitions & Developmental Editor: Kim Goodfriend
Associate Developmental Editor: Ben Tompkins
Editor: Nancy Conner, Marilyn Smith
Production Editors: Lisa Duran, Leslie E H Light
Technical Editors: Betty MacEwen, Ashok Hanumanth
Book Designer: Bill Gibson
Graphic Illustrator: Tony Jonick
Electronic Publishing Specialist: Susie Hendrickson
Proofreader: Lindy Wolf
Indexer: Matthew Spence
CD Coordinator: Kara Eve Schwartz
CD Technician: Keith McNeil
Cover Design: Archer Design
Cover/Photograph: Photo Researchers
Copyright © 2000 SYBEX Inc., 1151 Marina Village Parkway, Alameda, CA 94501 World rights reserved No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including but not limited to photo-copy, photograph, magnetic, or other record, without the prior agreement and written permission of the publisher Library of Congress Card Number: 00-105388
ISBN: 0-7821-2682-0
SYBEX and the SYBEX logo are trademarks of SYBEX Inc in the USA and other countries
The CD interface was created using Macromedia Director, COPYRIGHT 1994, 1997-1999 Macromedia Inc For more information on Macromedia and Macromedia Director, visit http://www.macromedia.com
SYBEX is an independent entity from Oracle Corporation and is not affiliated with Oracle Corporation in any manner This pub-lication may be used in assisting students to prepare for an Oracle Certified Professional exam Neither Oracle Corporation nor SYBEX warrants that use of this publication will ensure passing the relevant exam Oracle is either a registered trademark or a trademark of Oracle Corporation in the United States and/or other countries
TRADEMARKS: SYBEX has attempted throughout this book to distinguish proprietary trademarks from descriptive terms
by following the capitalization style used by the manufacturer
The author and publisher have made their best efforts to prepare this book, and the content is based upon final release soft-ware whenever possible Portions of the manuscript may be based upon pre-release versions supplied by softsoft-ware manu-facturer(s) The author and the publisher make no representation or warranties of any kind with regard to the completeness
or accuracy of the contents herein and accept no liability of any kind including but not limited to performance, merchant-ability, fitness for any particular purpose, or any losses or damages of any kind caused or alleged to be caused directly or indirectly from this book
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1
Copyright ©2000 SYBEX , Inc., Alameda, CA www.sybex.com
Trang 4Software License Agreement: Terms and Conditions
The media and/or any online materials accompanying this book
that are available now or in the future contain programs and/or
text files (the "Software") to be used in connection with the book
SYBEX hereby grants to you a license to use the Software, subject
to the terms that follow Your purchase, acceptance, or use of the
Software will constitute your acceptance of such terms
The Software compilation is the property of SYBEX
unless otherwise indicated and is protected by copyright
to SYBEX or other copyright owner(s) as indicated in the
media files (the "Owner(s)") You are hereby granted a
single-user license to use the Software for your personal,
noncommercial use only You may not reproduce, sell,
distribute, publish, circulate, or commercially exploit the
Software, or any portion thereof, without the written
consent of SYBEX and the specific copyright owner(s) of
any component software included on this media
In the event that the Software or components include specific
license requirements or end-user agreements, statements of
condition, disclaimers, limitations or warranties ("End-User
License"), those End-User Licenses supersede the terms and
conditions herein as to that particular Software component
Your purchase, acceptance, or use of the Software will
consti-tute your acceptance of such End-User Licenses
By purchase, use or acceptance of the Software you further
agree to comply with all export laws and regulations of the
United States as such laws and regulations may exist from
time to time
Reusable Code in This Book
The authors created reusable code in this publication
expressly for reuse for readers Sybex grants readers
permis-sion to reuse for any purpose the code found in this
publica-tion or its accompanying CD-ROM so long as all three
authors are attributed in any application containing the
reus-able code, and the code itself is never sold or commercially
exploited as a stand-alone product
Software Support
Components of the supplemental Software and any offers
associated with them may be supported by the specific
Owner(s) of that material but they are not supported by
SYBEX Information regarding any available support may be
obtained from the Owner(s) using the information provided in
the appropriate read.me files or listed elsewhere on the media
Should the manufacturer(s) or other Owner(s) cease to offer
Software is not available from SYBEX in any other form or media than that enclosed herein or posted to www.sybex.com
If you discover a defect in the media during this warranty period, you may obtain a replacement of identical format at no charge by sending the defective media, postage prepaid, with proof of purchase to:
SYBEX Inc
Customer Service Department
1151 Marina Village Parkway Alameda, CA 94501 (510) 523-8233 Fax: (510) 523-2373 e-mail: info@sybex.com WEB: HTTP://WWW.SYBEX.COM After the 90-day period, you can obtain replacement media of identical format by sending us the defective disk, proof of pur-chase, and a check or money order for $10, payable to SYBEX
Disclaimer
SYBEX makes no warranty or representation, either expressed
or implied, with respect to the Software or its contents, quality, performance, merchantability, or fitness for a particular pur-pose In no event will SYBEX, its distributors, or dealers be lia-ble to you or any other party for direct, indirect, special, incidental, consequential, or other damages arising out of the use of or inability to use the Software or its contents even if advised of the possibility of such damage In the event that the Software includes an online update feature, SYBEX further dis-claims any obligation to provide this feature for any specific duration other than the initial posting
The exclusion of implied warranties is not permitted by some states Therefore, the above exclusion may not apply to you This warranty provides you with specific legal rights; there may
be other rights that you may have that vary from state to state The pricing of the book with the Software by SYBEX reflects the allocation of risk and limitations on liability contained in this agreement of Terms and Conditions
Shareware Distribution
This Software may contain various programs that are distributed
as shareware Copyright laws apply to both shareware and ordi-nary commercial software, and the copyright Owner(s) retains all rights If you try a shareware program and continue using it, you
Trang 5To my wife Mary and my children Zachary and Charlie.
-Chip Dawes
To my wife Shiji and my parents, who are there whenever I need support and guidance.
-Biju Thomas
Copyright ©2000 SYBEX , Inc., Alameda, CA www.sybex.com
Trang 6Glossary 479
Primary Key Constraint A constraint on one or
more columns that combines NOT NULL constraints on
each protected column and a unique constraint on all
protected columns The primary key uniquely
identi-fies any row in a table
Private Synonym A restricted alias to another object
Procedure A stored PL/SQL program that gets
called as a statement A procedure does not return any
value directly, but you may pass values to and from
the procedure using parameters Procedures cannot be
used in SQL statements
Public Synonym A global alias to another object
Q
Qualify To further specify a table or column name
to avoid ambiguity The table name is qualified with
its owner or schema name; a column name is qualified
with its table name or alias name
Query A SELECT statement used to retrieve
already-saved data from the database
R
Raise an Exception To cause an error to occur
RDBMS Relational Database Management System
The most widely used database concept in the
infor-mation technology world
Record A composite datatype
ROLLBACK An action that undoes the changes made
to the database since the transaction began
ROWID The pseudo-column and physical address of a
row in a table
S
SAVEPOINT A marker set in between DML statements in
Script File A file that contains a set of commands that are run sequentially
Self-Join A join that occurs when the table is joined
to itself in a query
Sequence An Oracle object that provides unique sequential numbers
Single-Row Functions Functions that operate on a single row at a time These functions know how many arguments they will operate on at compile time, before any data is fetched
SQL Buffer The area in SQL*Plus where the last command executed is saved
SQL*Plus Oracle’s native tool to interact with the database
SQLCODE A built-in function that returns the current database error number
SQLERRM A built-in function that returns the text of the current database error
Statement A single SQL command that can include subqueries
Structured Query Language SQL, the database-access language to query and manipulate data in the database
Sub-Block The block that appears inside a block in
a nested block structure
Subquery A query inside a query
Subscript Notation The parenthetical notation used in references to elements in a collection
Synonym An alias name for an object Synonyms can mask the owner or even the database of the object
SYS The schema that owns the Oracle data dictionary
T
Trang 7480 Glossary
Trigger A stored program unit created in the Oracle
server, which is attached to an event and executes
when the event occurs Prior to Oracle8i, a trigger was
always attached to a table and the events were INSERT,
UPDATE, and DELETE In Oracle8i, triggers can be
cre-ated for database-level or user-level events
Truncate To remove all rows of data from the table
TYPE The statement used to define a record or collection
U
Unique Constraint A constraint on one or more
columns in a table that ensures no two rows contain
duplicate data in the protected columns
User Another term used for schema Schema, user,
and owner represent a logical grouping of database
objects in the database
V
Variable A memory location to store a value, which
may be used any number of times in the PL/SQL
pro-gram The value of the variable can be changed inside
the program
View A logical representation of data from tables
Views are stored queries
W
WHERE CURRENT OF A clause used in UPDATE and
DELETE statements inside an explicit cursor to point to
the most recent row fetched
Copyright ©2000 SYBEX , Inc., Alameda, CA www.sybex.com