Book description
The Definitive Guide to Oracle Database 11g
Get full details on the powerful features of Oracle Database 11g from this thoroughly updated Oracle Press guide. Oracle Database 11g: The Complete Reference explains how to use all the new features and tools, execute powerful SQL queries, construct PL/SQL and SQL*Plus statements, and work with large objects and object-relational databases. Learn how to implement the latest security measures, tune database performance, and deploy grid computing techniques. An invaluable cross-referenced appendix containing Oracle commands, keywords, features, and functions is also included.
- Install Oracle Database 11g or upgrade from an earlier version
- Create database tables, sequences, indexes, views, and user accounts
- Construct SQL statements, procedures, queries, and subqueries
- Optimize security using virtual private databases and transparent data encryption
- Import and export data using SQL*Loader and Oracle Data Pump
- Use SQL replay, change management, and result caching
- Avoid human errors using flashback and automatic undo management
- Build and tune PL/SQL triggers, functions, and packages
- Develop database applications using Java, JDBC, and XML
- Optimize availability and scalability with Oracle Real Application Clusters
Table of contents
- Cover Page
- Oracle Database 11g The Complete Reference
- Copyright Page
- Contents
- Acknowledgments
-
PART I Critical Database Concepts
- 1 Oracle Database 11g Architecture Options
- 2 Installing Oracle Database 11g and Creating a Database
- 3 Upgrading to Oracle Database 11g
-
4 Planning Oracle Applications—Approaches, Risks, and Standards
- The Cooperative Approach
- Everyone Has "Data"
- The Familiar Language of Oracle
- Tables of Information
- Structured Query Language
- A Simple Oracle Query
- Why It Is Called "Relational"
- Some Common, Everyday Examples
- What Are the Risks?
- The Importance of the New Vision
- Changing Environments
- Codes, Abbreviations, and Naming Standards
- How to Reduce the Confusion
- Normalization
- English Names for Tables and Columns
- English Words for the Data
- Capitalization in Names and Data
- Normalizing Names
- Good Design Has a Human Touch
- Understanding the Application Tasks
- Outline of Tasks
- Understanding the Data
- The Atomic Data Models
- The Atomic Business Model
- The Business Model
- Data Entry
- Query and Reporting
- Toward Object Name Normalization
- Level-Name Integrity
- Foreign Keys
- Singular Names
- Brevity
- Object Name Thesaurus
- Intelligent Keys and Column Values
- The Commandments
-
PART II SQL and SQL*Plus
-
5 The Basic Parts of Speech in SQL
- Style
- Creating the NEWSPAPER Table
- Using SQL to Select Data from Tables
- select, from, where, and order by
- Logic and Value
- Single-Value Tests
- LIKE
- Simple Tests Against a List of Values
- Combining Logic
- Another Use for where: Subqueries
- Single Values from a Subquery
- Lists of Values from a Subquery
- Combining Tables
- Creating a View
- Expanding the View
-
6 Basic SQL*Plus Reports and Commands
- Building a Simple Report
- remark
- set headsep
- ttitle and btitle
- column
- break on
- compute avg
- set linesize
- set pagesize
- set newpage
- spool
- /* */
- Some Clarification on Column Headings
- Other Features
- Command Line Editor
- set pause
- save
- store
- Editing
- host
- Adding SQL*Plus Commands
- start
- Checking the SQL*Plus Environment
- Building Blocks
-
7 Getting Text Information and Changing It
- Datatypes
- What Is a String?
- Notation
- Concatenation (||)
- How to Cut and Paste Strings
- RPAD and LPAD
- LTRIM, RTRIM, and TRIM
- Combining Two Functions
- Using the TRIM Function
- Adding One More Function
- LOWER, UPPER, and INITCAP
- LENGTH
- SUBSTR
- INSTR
- ASCII and CHR
- Using order by and where with String Functions
- SOUNDEX
- National Language Support
- Regular Expression Support
- Review
- 8 Searching for Regular Expressions
-
9 Playing the Numbers
- The Three Classes of Number Functions
- Notation
- Single-Value Functions
- Addition (+), Subtraction (-), Multiplication (*), and Division (/)
- NULL
- NVL: NULL-Value Substitution
- ABS: Absolute Value
- CEIL
- FLOOR
- MOD
- POWER
- SQRT: Square Root
- EXP, LN, and LOG
- ROUND and TRUNC
- SIGN
- SIN, SINH, COS, COSH, TAN, TANH, ACOS, ATAN, ATAN2, and ASIN
- Aggregate Functions
- NULLs in Group-Value Functions
- Examples of Single- and Group-Value Functions
- AVG, COUNT, MAX, MIN, and SUM
- Combining Group-Value and Single-Value Functions
- STDDEV and VARIANCE
- DISTINCT in Group Functions
- List Functions
- Finding Rows with MAX or MIN
- Precedence and Parentheses
- Review
-
10 Dates: Then, Now, and the Difference
- Date Arithmetic
- SYSDATE, CURRENT_DATE, and SYSTIMESTAMP
- The Difference Between Two Dates
- Adding Months
- Subtracting Months
- GREATEST and LEAST
- NEXT_DAY
- LAST_DAY
- MONTHS_BETWEEN Two Dates
- Combining Date Functions
- ROUND and TRUNC in Date Calculations
- TO_DATE and TO_CHAR Formatting
- The Most Common TO_CHAR Error
- NEW_TIME: Switching Time Zones
- TO_DATE Calculations
- Dates in where Clauses
- Dealing with Multiple Centuries
- Using the EXTRACT Function
- Using the TIMESTAMP Datatypes
- 11 Conversion and Transformation Functions
- 12 Grouping Things Together
-
13 When One Query Depends upon Another
- Advanced Subqueries
- Correlated Subqueries
- Coordinating Logical Tests
- Using EXISTS and Its Correlated Subquery
- Outer Joins
- Pre-Oracle9 i Syntax for Outer Joins
- Current Syntax for Outer Joins
- Replacing NOT IN with an Outer Join
- Replacing NOT IN with NOT EXISTS
- Natural and Inner Joins
- UNION, INTERSECT, and MINUS
- IN Subqueries
- Restrictions on UNION, INTERSECT, and MINUS
- 14 Some Complex Possibilities
- 15 Changing Data: insert, update, merge, and delete
- 16 DECODE and CASE: if, then, and else in SQL
-
17 Creating and Managing Tables, Views, Indexes, Clusters, and Sequences
- Creating a Table
- Character Width and NUMBER Precision
- Rounding During Insertion
- Constraints in create table
- Designating Index Tablespaces
- Naming Constraints
- Dropping Tables
- Altering Tables
- The Rules for Adding or Modifying a Column
- Creating Read-Only Tables
- Altering Actively Used Tables
- Creating Virtual Columns
- Dropping a Column
- Creating a Table from a Table
- Creating an Index-Organized Table
- Creating a View
- Stability of a View
- Using order by in Views
- Creating a Read-Only View
- Indexes
- Creating an Index
- Enforcing Uniqueness
- Creating a Unique Index
- Creating a Bitmap Index
- When to Create an Index
- Creating Invisible Indexes
- Variety in Indexed Columns
- How Many Indexes to Use on a Table
- Placing an Index in the Database
- Rebuilding an Index
- Function-Based Indexes
- Clusters
- Sequences
- 18 Partitioning
-
19 Basic Oracle Security
- Users, Roles, and Privileges
- Creating a User
- Password Management
- Standard Roles
- Format for the grant Command
- Revoking Privileges
- What Users Can Grant
- Moving to Another User with connect
- create synonym
- Using Ungranted Privileges
- Passing Privileges
- Creating a Role
- Granting Privileges to a Role
- Granting a Role to Another Role
- Granting a Role to Users
- Adding a Password to a Role
- Removing a Password from a Role
- Enabling and Disabling Roles
- Revoking Privileges from a Role
- Dropping a Role
- Granting UPDATE to Specific Columns
- Revoking Object Privileges
- Security by User
- Granting Access to the Public
- Granting Limited Resources
-
5 The Basic Parts of Speech in SQL
-
PART III Beyond the Basics
- 20 Advanced Security—Virtual Private Databases
- 21 Advanced Security: Transparent Data Encryption
-
22 Working with Tablespaces
- Tablespaces and the Structure of the Database
- Tablespace Contents
- RECYCLEBIN Space in Tablespaces
- Read-Only Tablespaces
- nologging Tablespaces
- Temporary Tablespaces
- Tablespaces for System-Managed Undo
- Bigfile Tablespaces
- Encrypted Tablespaces
- Supporting Flashback Database
- Planning Your Tablespace Usage
- Separate Active and Static Tables
- Separate Indexes and Tables
- Separate Large and Small Objects
- Separate Application Tables from Core Objects
- 23 Using SQL*Loader to Load Data
-
24 Using Data Pump Export and Import
- Creating a Directory
- Data Pump Export Options
- Starting a Data Pump Export Job
- Stopping and Restarting Running Jobs
- Exporting from Another Database
- Using EXCLUDE, INCLUDE, and QUERY
- Data Pump Import Options
- Starting a Data Pump Import Job
- Stopping and Restarting Running Jobs
- EXCLUDE, INCLUDE, and QUERY
- Transforming Imported Objects
- Generating SQL
- 25 Accessing Remote Data
-
26 Using Materialized Views
- Functionality
- Required System Privileges
- Required Table Privileges
- Read-Only vs. Updatable
- create materialized view Syntax
- Types of Materialized Views
- RowID vs. Primary Key-Based Materialized Views
- Using Prebuilt Tables
- Indexing Materialized View Tables
- Using Materialized Views to Alter Query Execution Paths
- Using DBMS_ADVISOR
- Refreshing Materialized Views
- What Kind of Refreshes Can Be Performed?
- Fast Refresh with CONSIDER FRESH
- Automatic Refreshes
- Manual Refreshes
- create materialized view log Syntax
- Altering Materialized Views and Logs
- Dropping Materialized Views and Logs
-
27 Using Oracle Text for Text Searches
- Adding Text to the Database
- Text Queries and Text Indexes
- Text Queries
- Available Text Query Expressions
- Searching for an Exact Match of a Word
- Searching for an Exact Match of Multiple Words
- Searching for an Exact Match of a Phrase
- Searches for Words That Are Near Each Other
- Using Wildcards During Searches
- Searching for Words That Share the Same Stem
- Searching for Fuzzy Matches
- Searches for Words That Sound Like Other Words
- Using the ABOUT Operator
- Index Synchronization
- Index Sets
-
28 Using External Tables
- Accessing the External Data
- Creating an External Table
- External Table Creation Options
- Loading External Tables on Creation
- Altering External Tables
- Access Parameters
- Add Column
- Default Directory
- Drop Column
- Location
- Modify Column
- Parallel
- Project Column
- Reject Limit
- Rename To
- Limitations, Benefits, and Potential Uses of External Tables
- 29 Using Flashback Queries
- 30 Flashback—Tables and Databases
-
31 SQL Replay
- High-level Configuration
- Isolation and Links
- Creating a Workload Directory
- Capturing the Workload
- Defining Filters
- Starting the Capture
- Stopping the Capture
- Exporting AWR Data
- Processing the Workload
- Replaying the Workload
- Controlling and Starting the Replay Clients
- Initializing and Running the Replay
- Exporting AWR Data
-
PART IV PL/SQL
- 32 An Introduction to PL/SQL
- 33 Online Application Upgrades
-
34 Triggers
- Required System Privileges
- Required Table Privileges
- Types of Triggers
- Row-Level Triggers
- Statement-Level Triggers
- BEFORE and AFTER Triggers
- INSTEAD OF Triggers
- Schema Triggers
- Database-Level Triggers
- Compound Triggers
- Trigger Syntax
- Combining DML Trigger Types
- Setting Inserted Values
- Maintaining Duplicated Data
- Customizing Error Conditions
- Calling Procedures Within Triggers
- Naming Triggers
- Creating DDL Event Triggers
- Creating Database Event Triggers
- Creating Compound Triggers
- Enabling and Disabling Triggers
- Replacing Triggers
- Dropping Triggers
-
35 Procedures, Functions, and Packages
- Required System Privileges
- Required Table Privileges
- Procedures vs. Functions
- Procedures vs. Packages
- create procedure Syntax
- create function Syntax
- Referencing Remote Tables in Procedures
- Debugging Procedures
- Creating Your Own Functions
- Customizing Error Conditions
- Naming Procedures and Functions
- create package Syntax
- Viewing Source Code for Procedural Objects
- Compiling Procedures, Functions, and Packages
- Replacing Procedures, Functions, and Packages
- Dropping Procedures, Functions, and Packages
- 36 Using Native Dynamic SQL and DBMS_SQL
- 37 PL/SQL Tuning
-
PART V Object-Relational Databases
- 38 Implementing Object Types, Object Views, and Methods
-
39 Collectors (Nested Tables and Varying Arrays)
- Varying Arrays
- Creating a Varying Array
- Describing the Varying Array
- Inserting Records into the Varying Array
- Selecting Data from Varying Arrays
- Nested Tables
- Specifying Tablespaces for Nested Tables
- Inserting Records into a Nested Table
- Working with Nested Tables
- Additional Functions for Nested Tables and Varying Arrays
- Management Issues for Nested Tables and Varying Arrays
- Variability in Collectors
- Location of the Data
- 40 Using Large Objects
-
41 Advanced Object-Oriented Concepts
- Row Objects vs. Column Objects
- Object Tables and OIDs
- Inserting Rows into Object Tables
- Selecting Values from Object Tables
- Updates and Deletes from Object Tables
- The REF Function
- Using the DEREF Function
- The VALUE Function
- Invalid References
- Object Views with REFs
- A Quick Review of Object Views
- Object Views Involving References
- Object PL/SQL
- Objects in the Database
- PART VI Java in Oracle
-
PART VII Hitchhiker's Guides
-
45 The Hitchhiker's Guide to the Oracle Data Dictionary
- A Note about Nomenclature
- New Views Introduced in Oracle Database 11g
- The Road Maps: DICTIONARY (DICT) and DICT_COLUMNS
- Things You Select From: Tables (and Columns), Views, Synonyms, and Sequences
- Catalog: USER_CATALOG (CAT)
- Objects: USER_OBJECTS (OBJ)
- Tables: USER_TABLES (TABS)
- Columns: USER_TAB_COLUMNS (COLS)
- Views: USER_VIEWS
- Synonyms: USER_SYNONYMS (SYN)
- Sequences: USER_SEQUENCES (SEQ)
- Recycle Bin: USER_RECYCLEBIN and DBA_RECYCLEBIN
- Constraints and Comments
- Constraints: USER_CONSTRAINTS
- Constraint Columns: USER_CONS_COLUMNS
- Constraint Exceptions: EXCEPTIONS
- Table Comments: USER_TAB_COMMENTS
- Column Comments: USER_COL_COMMENTS
- Indexes and Clusters
- Indexes: USER_INDEXES (IND)
- Indexed Columns: USER_IND_COLUMNS
- Clusters: USER_CLUSTERS (CLU)
- Cluster Columns: USER_CLU_COLUMNS
- Abstract Datatypes and LOBs
- Abstract Datatypes: USER_TYPES
- LOBs: USER_LOBS
- Database Links and Materialized Views
- Database Links: USER_DB_LINKS
- Materialized Views
- Materialized View Logs: USER_MVIEW_LOGS
- Triggers, Procedures, Functions, and Packages
- Triggers: USER_TRIGGERS
- Procedures, Functions, and Packages: USER_SOURCE
- Dimensions
- Space Allocation and Usage, Including Partitions and Subpartitions
- Tablespaces: USER_TABLESPACES
- Space Quotas: USER_TS_QUOTAS
- Segments and Extents: USER_SEGMENTS and USER_EXTENTS
- Partitions and Subpartitions
- Free Space: USER_FREE_SPACE
- Users and Privileges
- Users: USER_USERS
- Resource Limits: USER_RESOURCE_LIMITS
- Table Privileges: USER_TAB_PRIVS
- Column Privileges: USER_COL_PRIVS
- System Privileges: USER_SYS_PRIVS
- Roles
- Auditing
- Miscellaneous
- Monitoring: The V$ Dynamic Performance Tables
- CHAINED_ROWS
- PLAN_TABLE
- Interdependencies: USER_DEPENDENCIES and IDEPTREE
- DBA-Only Views
- Oracle Label Security
- SQL*Loader Direct Load Views
- Globalization Support Views
- Libraries
- Heterogeneous Services
- Indextypes and Operators
- Outlines
- Advisors
- Schedulers
-
46 The Hitchhiker's Guide to Tuning Applications and SQL
- New Tuning Features in Oracle Database 11g
- New Tuning Features in Oracle 11g
- Tuning—Best Practices
- Do as Little as Possible
- Do It as Simply as Possible
- Tell the Database What It Needs to Know
- Maximize the Throughput in the Environment
- Divide and Conquer Your Data
- Test Correctly
- Generating and Reading Explain Plans
- Using set autotrace on
- Using explain plan
- Major Operations Within Explain Plans
- TABLE ACCESS FULL
- TABLE ACCESS BY INDEX ROWID
- Related Hints
- Operations That Use Indexes
- When Indexes Are Used
- Operations That Manipulate Data Sets
- Operations That Perform Joins
- How Oracle Handles Joins of More than Two Tables
- Parallelism and Cache Issues
- Implementing Stored Outlines
- Review
- 47 SQL Result Cache and Client-Side Query Cache
- 48 Case Studies in Tuning
- 49 Advanced Architecture Options—DB Vault, Content DB, and Records DB
- 50 Oracle Real Application Clusters
-
51 The Hitchhiker's Guide to Database Administration
- Creating a Database
- Using the Oracle Enterprise Manager
- Starting and Stopping the Database
- Sizing and Managing Memory Areas
- The Initialization Parameter File
- Allocating and Managing Space for the Objects
- Implications of the storage Clause
- Table Segments
- Index Segments
- System-Managed Undo
- Temporary Segments
- Free Space
- Sizing Database Objects
- Monitoring an Undo Tablespace
- Automating Storage Management
- Configuring ASM
- Segment Space Management
- Transporting Tablespaces
- Generating a Transportable Tablespace Set
- Plugging in the Transportable Tablespace Set
- Performing Backups
- Data Pump Export and Import
- Offline Backups
- Online Backups
- Recovery Manager
- Where to Go from Here
- 52 The Hitchhiker's Guide to XML in Oracle
-
45 The Hitchhiker's Guide to the Oracle Data Dictionary
- PART VIII Alphabetical Reference
- Index
Product information
- Title: Oracle Database 11g The Complete Reference
- Author(s):
- Release date: October 2008
- Publisher(s): McGraw Hill Computing
- ISBN: 9780071598767
You might also like
book
Oracle Database 11g SQL
Write powerful SQL statements and PL/SQL programs Learn to access Oracle databases through SQL statements and …
book
Oracle SQL Revealed: Executing Business Logic in the Database Engine
Write queries using little-known, but powerful, SQL features implemented in Oracle's database engine. You will be …
video
Oracle 11g
In this Oracle 11g video based training course, through the expert tutelage of Lewis Cunningham, you …
book
Oracle Database 11g Performance Tuning Recipes: A Problem-Solution Approach
Performance problems are rarely "problems" per se. They are more often "crises" during which you're pressured …