没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
Oracle9
i
Application Developer’s Guide - Fundamentals
Release 2 (9.2)
March 2002
Part No. A96590-01
Oracle9i Application Developer’s Guide - Fundamentals, Release 2 (9.2)
Part No. A96590-01
Copyright © 1996, 2002 Oracle Corporation. All rights reserved.
Primary Author: John Russell
Contributing Authors: T. Brooksfuller, T. Burroughs, M. Cowan, J. Levinger, R. Moran, R. Strohm
Contributors: D. Alpern, G. Arora, C. Barclay, D. Bronnikov, T. Chang, M. Davidson, G. Doherty, D.
Elson, A. Ganesh, M. Hartstein, J. Huang, N. Jain, R. Jenkins Jr., S. Kotsovolos, S. Kumar, C. Lei, D.
Lorentz, R. Murthy, R. Pang, B. Sinha, S. Vemuri, W. Wang, D. Wong, A. Yalamanchi, Q. Yu
Graphic Designer: V. Moore
The Programs (which include both the software and documentation) contain proprietary information of
Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent and other intellectual and industrial property
laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent required
to obtain interoperability with other independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice. If you find any problems
in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this
document is error-free. Except as may be expressly permitted in your license agreement for these
Programs, no part of these Programs may be reproduced or transmitted in any form or by any means,
electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on
behalf of the U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial
computer software" and use, duplication, and disclosure of the Programs, including documentation,
shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement.
Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer
software" and use, duplication, and disclosure of the Programs shall be subject to the restrictions in FAR
52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500
Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for
such purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the
Programs.
Oracle is a registered trademark, and ConText, Oracle Store, Oracle7, Oracle8, Oracle8i, Oracle9i,
PL/SQL, Pro*COBOL, Pro*C, Pro*C/C++, SQL*Net, and SQL*Plus are trademarks or registered
trademarks of Oracle Corporation. Other names may be trademarks of their respective owners.
iii
Contents
Send Us Your Comments................................................................................................................ xvii
Preface.......................................................................................................................................................... xix
What’s New in Application Development? .......................................................................... xxix
1 Understanding the Oracle Programmatic Environments
Overview of Developing an Oracle Application.......................................................................... 1-2
Overview of PL/SQL.......................................................................................................................... 1-3
A Simple PL/SQL Example........................................................................................................ 1-4
Advantages of PL/SQL ............................................................................................................... 1-4
Overview of Java Stored Procedures, JDBC, and SQLJ .............................................................. 1-8
Overview of Writing Procedures and Functions in Java....................................................... 1-8
Overview of Oracle JDBC............................................................................................................ 1-9
Overview of Oracle SQLJ................................................................................................................ 1-14
SQLJ Tool..................................................................................................................................... 1-14
Benefits of SQLJ .......................................................................................................................... 1-15
Comparing SQLJ with JDBC..................................................................................................... 1-15
SQLJ Example for Object Types ............................................................................................... 1-17
SQLJ Stored Procedures in the Server ..................................................................................... 1-20
Programming with J2EE, OC4J, SOAP, JAAS, Servlets, JSPs, EJBs, CORBA, and UDDI.. 1-20
Overview of Pro*C/C++................................................................................................................... 1-21
How You Implement a Pro*C/C++ Application................................................................... 1-21
Highlights of Pro*C/C++ Features.......................................................................................... 1-23
iv
Overview of Pro*COBOL................................................................................................................ 1-24
How You Implement a Pro*COBOL Application.................................................................. 1-24
Highlights of Pro*COBOL Features......................................................................................... 1-26
Overview of OCI and OCCI ........................................................................................................... 1-26
Advantages of OCI..................................................................................................................... 1-27
Parts of the OCI........................................................................................................................... 1-28
Procedural and Non-Procedural Elements............................................................................. 1-28
Building an OCI Application .................................................................................................... 1-29
Overview of Oracle Objects for OLE (OO4O)............................................................................. 1-31
OO4O Automation Server......................................................................................................... 1-32
OO4O Object Model................................................................................................................... 1-32
Support for Oracle LOB and Object Datatypes...................................................................... 1-37
The Oracle Data Control............................................................................................................ 1-39
The Oracle Objects for OLE C++ Class Library...................................................................... 1-39
Additional Sources of Information........................................................................................... 1-39
Choosing a Programming Environment....................................................................................... 1-40
Choosing Whether to Use OCI or a Precompiler................................................................... 1-40
Using Built-In Packages and Libraries..................................................................................... 1-41
Java versus PL/SQL................................................................................................................... 1-42
2 Managing Schema Objects
Managing Tables ................................................................................................................................ 2-2
Designing Tables .......................................................................................................................... 2-3
Creating Tables ............................................................................................................................. 2-3
Managing Temporary Tables ............................................................................................................ 2-4
Creating Temporary Tables......................................................................................................... 2-5
Using Temporary Tables ............................................................................................................. 2-5
Examples: Using Temporary Tables .......................................................................................... 2-6
Tip: Referencing the Same Subquery Multiple Times............................................................. 2-7
Managing Views.................................................................................................................................. 2-9
Creating Views ............................................................................................................................. 2-9
Replacing Views ......................................................................................................................... 2-11
Using Views in Queries ............................................................................................................ 2-12
Dropping Views ......................................................................................................................... 2-14
Modifying a Join View .................................................................................................................... 2-15
v
About Key-Preserved Tables ................................................................................................... 2-16
Rule for DML Statements on Join Views ................................................................................ 2-17
Using the UPDATABLE_COLUMNS Views.......................................................................... 2-20
Outer Joins .................................................................................................................................. 2-20
Managing Sequences ....................................................................................................................... 2-23
Creating Sequences ................................................................................................................... 2-23
Altering Sequences .................................................................................................................... 2-24
Using Sequences ......................................................................................................................... 2-24
Dropping Sequences ................................................................................................................. 2-28
Managing Synonyms ....................................................................................................................... 2-28
Creating Synonyms ................................................................................................................... 2-29
Using Synonyms in DML Statements ..................................................................................... 2-29
Dropping Synonyms ................................................................................................................. 2-30
Creating Multiple Tables and Views in One Operation .......................................................... 2-30
Naming Schema Objects................................................................................................................. 2-31
Rules for Name Resolution in SQL Statements ..................................................................... 2-32
Renaming Schema Objects ............................................................................................................ 2-33
Switching to a Different Schema................................................................................................... 2-34
Listing Information about Schema Objects................................................................................. 2-34
3 Selecting a Datatype
Summary of Oracle Built-In Datatypes.......................................................................................... 3-2
Representing Character Data.......................................................................................................... 3-10
Representing Numeric Data........................................................................................................... 3-13
Representing Date and Time Data ................................................................................................ 3-14
Date Format................................................................................................................................. 3-15
Time Format................................................................................................................................ 3-16
Establishing Year 2000 Compliance......................................................................................... 3-19
Representing Geographic Coordinate Data ................................................................................ 3-27
Representing Image, Audio, and Video Data.............................................................................. 3-27
Representing Searchable Text Data............................................................................................... 3-27
Representing Large Data Types..................................................................................................... 3-27
Migrating LONG Datatypes to LOB Datatypes..................................................................... 3-28
Using RAW and LONG RAW Datatypes ............................................................................... 3-32
Addressing Rows Directly with the ROWID Datatype............................................................ 3-33
剩余741页未读,继续阅读
资源评论
pan6best
- 粉丝: 0
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功