Home > Store

Oracle 8i and Java: From Client Server to E-Commerce

Register your product to gain access to bonus material or receive a coupon.

Oracle 8i and Java: From Client Server to E-Commerce

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2001
  • Dimensions: K
  • Pages: 1232
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-017613-3
  • ISBN-13: 978-0-13-017613-4

Oracle users know: The Internet changes everything. Harness Oracle to the power of Java programming language to take your e-business to the top.

More than 90% of all e-business solutions include Oracle databases, from Amazon to eBay. But the database is only half the story. This book shows you how to use Java programming tools to bring your database to life on the Internet, utilizing the new integration between Java and Oracle.

You can connect a Java program to your database through the JDBC, for instance, pooling connections via servlets or implementing three-tiered applications through RMI. Or, Java can be used directly with the Oracle Application Server as a full-fledged development and production environment, supporting Servlets, JavaServer Pages, CORBA, and Enterprise JavaBeans. At the highest level, Java applications can run directly into the database using the Java virtual machine that is part of Oracle 8i. All these powerful features make Oracle + Java a perfect choice for the secure, scalable, 24/7 needs of e-commerce.

Filled with detailed explanations and working diagrams, Oracle 8i & Java: From Client/Server to E-Commerce covers a wide range of Oracle/Java topics, including four crucial knowledge areas:

Object-Relational Databases: Architecture, DDL, DML, SQL, performance, and securityStored Procedures and Business Components: PL/SQL, SQLJ, JDBC 2.0, BC4J, and XMLMiddleware: Servlets, JavaServer Pages, Active Server Pages, Sockets, and JNIOracle 8i functionality: Enterprise JavaBeans, CORBA servers, clients, and objects

The CD-ROM includes sample code from the book for Linux/UNIX, Windows, and MacOS.

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130176133.pdf

Table of Contents



Preface.


1. Introduction to Oracle Object-Relational Database Design and Architecture.

Relational Model and Design for the Bookstore. Importance of the Database Model and Design. Transforming an ERD into a Table Design. Transforming Supertype and Subtype Entities. Generic Subtype Design. Table or System Design. Object Model and Design for the Bookstore. Mapping the Class Model to an Oracle Database. Object to Relational Mapping Rules. Summary.



2. Data Definition Language (DDL) Statements.

Overview of SQL Statements. A Brief Introduction to Oracle SQL*Plus. Generic DDL Syntax. Oracle Naming Rules for Database Structures. Oracle8 Built-in Data Types. Relational Tables. Alternative CREATE TABLE Syntax. Relational Views. Oracle Sequences. Oracle Synonyms. Oracle Object Types. Oracle Object Tables. Oracle Object Views. Security: Access-Control Statements. Summary.



3. Query Processing.

SELECT Statements. Single Row Functions. WHERE CLAUSE to Restrict Rows Retrieved. Table Join Operations. ORDER BY. Aggregate Functions. GROUP BY Clauses. HAVING Clauses. Subqueries. Querying Object Structures. Summary.



4. Data Manipulation Language (DML) Statements and Transactions.

DML on Relational Tables. DML on Object Tables. DML on Collection Objects. Getting More Performance with DML. Transactions in Oracle SQL. Summary.



5. Oracle Architecture and Performance Considerations.

Architectural Elements. Performance Tuning. Summary.



6. Internet Security and Oracle security.

Network Firewalls. Oracle Security. The Demilitarized Zone. Using Oracle Security and Synonyms to Implement a Development Environment. New Oracle Security Features. Summary.



7. Introduction to PL/SQL.

Anonymous Blocks. PL/SQL Variables and Data Types. Conditional and Sequential Controls. Using SQL Statements in PL/SQL. Cursors. PL/SQL Tables and Varying Arrays. User-Defined/Object Types in PL/SQL. Summary.



8. PL/SQL Procedures, Functions, Packages, and Exceptions.

Stored Procedures and Functions. PL/SQL Packages. PL/SQL and Object Types. Exception Handling in PL/SQL. Transactions in PL/SQL. Java and PL/SQL: A Comparison. Performance Considerations. Summary.



9. Data Access with JDBC-Java Database Connectivity.

Introducing the JDBC Architecture. The Driver Manager and JDBC Drivers. Overview of JDBC Interfaces and Classes. Using JDBC Objects. Summary.



10. Enhanced Database Access with JDBC.

Extensions to Oracle JDBC Drivers. Support for the JDBC 2.0 Optional Package. Summary.



11. Data Access with SQLJ-Embedding SQL in Java.

An Overview of SQLJ. Connecting to a Database in SQLJ. Executing SQL Statements Using SQLJ. Processing Oracle SQL Object Types. Processing SQL Collections. Managing Large Data Types. Executing Stored Procedures and Functions. Summary.



12. Java Stored Procedures In Oracle.

Java Code Running in the Oracle Kernel. Three Steps to Develop and Deploy Stored Procedures. Making Java and PL/SQL Interact. PL/SQL versus Java: Choosing the Right Tool for Your Task. Summary.



13. Business Components for Java and XML.

The Business Component for Java Framework. Introduction to XML Basics. Creating a Business Component Application Module. Testing Components and the Application Module. Creating BC4J Client Applications. Customizing the Components. Deploying a Business Component. Summary.



14. Data Access Using Java Servlets and Connection Pooling.

Multiple Threads, Session State, and Security. Connection Pooling. A Servlet Example. BookServlet: Pros and Cons. Running BookServlet. Summary.



15. Java Server Pages and Active Server Pages.

JSP: An Overview. ASP: An Overview. JSP and ASP Compared. Reworking BookServlet Using JSP. Summary.



16. Using Java in Oracle Application Server.

Evolution of Oracle Application Server. Oracle Application Server Architecture. Configuring PL/SQL Applications. Configuring Java Applications. Introducing Oracle9i Application Server. Summary.



17. Web-Enabling Legacy Applications Using Network Sockets.

The Mediator Design Pattern. Java Sockets. Summary.



18. Web-Enabling Legacy Applications Using JNI.

Oracle Pre-Compilers. Java Native Methods. Setting Up Your Environment to Run the Example. Debugging JNI Functions. Summary.



19. Accessing Oracle Advanced Queuing Through Java.

Application Queues. Oracle Advanced Queuing. Examples of Advanced Queuing. Summary.



20. Using Oracle Replication to Build Distributed Systems.

Data Replication. Basic Replication in Oracle. An Example of Data Replication. Summary.



21. The Enterprise JavaBean: An Introduction.

EJB Environment and Structure. Creating an Enterprise JavaBean. Creating EJB Client Application. Creating an EJB and Client with JDeveloper. Running the Enterprise JavaBean. Summary.



22. Deploying and Using an Enterprise JavaBean.

Preparing to Run Oracle8i EJB Services. Deploying an EJB with Command-Line Utilities. Running the Client Application after Deployment. Transaction-Enabling an Enterprise JavaBean. Restrictions and Limitations with Oracle8i EJBs. EJB Security in Oracle8i. Removing an EJB from Oracle8i Server. Deploying an Enterprise JavaBean to Oracle Application Server. Summary.



23. CORBA and Its Implementation in Oracle8i: An Overview.

Distributed Computing: Historical Background. The Common Object Broker Architecture. Putting It All Together: The First CORBA Program. The Java Transaction Service (JTS). Summary.



24. Advanced CORBA Topics.

More on Interface Definition Language. Managing the Oracle Name Space. Using the CORBA Tie Mechanism. Further References. Summary.

Preface

Introduction and Overview

This book is about software development using Oracle and Java, two of the most powerful and robust platforms available for building Internet enabled applications. Since there are many books about Oracle, and even more about Java, we embarked on this project to bring these two worlds together, firm in our belief that there are few books that give a detailed perspective by combining the strengths of Oracle and Java in one book. We see this book as a valuable friend, learning aid, and reference for any Java developer building web-enabled applications accessing an Oracle database.

This is a book written for developers by seasoned professionals who have been actively using and teaching Oracle and Java technology for some years. The focus of "Oracle8i and Java: From Client/Server to e-Commerce" is primarily from a software developer's perspective. However, application designers and system architects will also find this book valuable because they will gain a broad and solid understanding of combining the object oriented world of Java with the object-relational world of Oracle technology. With this in mind, we have assumed that:

  • You already know how to develop basic Java code and understand the fundamental object-oriented features of the Java language.
  • You may have used SQL and relational databases, possibly even Oracle, but do not know much detail about Oracle databases.

Therefore, a portion of this book is devoted to Oracle database fundamentals and object-relational features found in SQL and PL/SQL. The first chapter provides a discussion of the database model and tables used for most of the examples found in the book. When coupled with the SQL and PL/SQL chapters, it provides a foundation on which to build Java code that capitalizes on the best features of an Oracle database.

If you are already experienced with Oracle SQL and PL/SQL, you may find that you can skip the first six chapters of the book. However, we recommend that you read the first chapter, and encourage you to look at the early chapters, as we believe you are likely to find valuable information on the Oracle database architecture, SQL and PL/SQL functionality, and, particularly, information on using object-relational structures.

Many organizations are now building web-enabled applications, most likely for electronic commerce. Thus, the contents of this book place an emphasis on Java development using technology in the middle-tier such as Oracle Application Server or equivalent web servers, and, in the backend, using an Oracle8i database. During this project there were rapid changes in the Java and Oracle software platforms, making the task of keeping up with these moving targets impossible, and we were in danger of being caught in a never-ending documentation cycle. Like all projects, there had to be an end, and despite the fact that Oracle released a successor to Oracle Application Server, i.e. Oracle9i Application Server, and announced that Oracle9i was around the corner, we felt this book had a great deal to offer and know that its contents, for the most part, will be applicable in the context of future releases of Java and Oracle software.

The code examples were developed using either Oracle8i Release 1 (8.1.5) and/or Release 2 (8.1.6) using the JDK 1.1.8 and, in some cases, JDK 1.2 with JDeveloper 3.0 and JDeveloper 3.1. The platforms used for code development included Microsoft Windows, Solaris, and Linux. Historically, the original title of the book was "Oracle for Java Programmers," which was replaced by its published title "Oracle8i and Java: From Client/Server to e-Commerce." For this reason, you will find our source code examples use Java package names like com.prenhall.OFJP.*, where the OFJP acronym was derived from the first letters of the original book title.

The Structure of the Book Contents

The first chapter provides unique coverage of using an object-oriented database design approach and transformation into a relational, or object-relational implementation, by using an object-oriented style of persistence that closely fits the world of Java application development. In addition, there is coverage of Oracle8 SQL Object types and SQL collections that are not widely used, and, therefore, not widely written about in the context of Java and SQLJ applications. Information on SQL Objects, provided here, will provide a basic understanding enabling you to leap into the promising future releases of the Oracle database with impending changes to the object-relational functionality that cannot be covered in this book due to time constraints.

Although this book has no physical indication of major parts, the twenty-four chapters are logically arranged into four parts:

  • Part I: Oracle Object-Relational Databases and the SQL Language introduces you to some object and relational database analysis and design principles, and mapping an object design to a relational implementation. You are provided with a basic introduction to Oracle SQL and PL/SQL, and discussions highlighting new features found in Oracle8i syntax. The SQL and PL/SQL chapters provide less comprehensive examples to cover syntax, avoid creating a huge book, and cover subject matter well covered elsewhere. The chapters included in this part are:
    • Chapter 1: Introduction to Oracle Object-Relational Database Design and Architecture
    • Chapter 2: Data Definition Language (DDL) Statements
    • Chapter 3: Query Processing
    • Chapter 4: Data Manipulation Language (DML) Statements and Transactions
    • Chapter 5: Oracle Architecture and Performance Considerations
    • Chapter 6: Oracle Security and Internet Security
  • Part II: Oracle PL/SQL and Java Stored Procedures, Business Components and XML discusses programmatic functionality within the database in the form of PL/SQL and Java Stored procedures, and outside the database using Java with comprehensive coverage of JDBC 1.0 and some JDBC 2.0 features, and a chapter devoted to SQLJ technology. A special highlight in this group of chapters is the introduction to Oracle Business Components for Java--a framework of generated Java classes and XML files used to manage your database data independent of the user presentation layer. Oracle Business Components for Java is a technology yet to be discovered and can change the way your Java applications manage database data in any relational database. The chapters applicable to this part are:
    • Chapter 7: Introduction to PL/SQL
    • Chapter 8: PL/SQL Procedures, Functions, Packages and Exceptions
    • Chapter 9: Data Access with JDBC - Java Database Connectivity
    • Chapter 10: JDBC 2.0 and Oracle Extensions to JDBC
    • Chapter 11: Data access with SQLJ - Embedding SQL in Java
    • Chapter 12: Java Stored Procedures in Oracle8i.
    • Chapter 13: Business Components for Java and XML
  • Part III: Middleware: Servlets, Java Server Pages and Application Servers devotes itself to developing Java code in the middle-tier. Therefore, as the title states, you read about Java Servlets and JavaServer Pages using the Oracle platform, while non-Oracle environments are discussed for contrast. This section is also about scalability, and covers connection pooling, advanced queuing, distributing, and replicating the Oracle database data. Integration techniques are covered for web-enabling legacy systems through the use of Java Native Interface (JNI) API, and Java network sockets. The chapters that cover these topics include:
    • Chapter 14: Data Access using Java Servlets and Connection Pooling
    • Chapter 15: Active Server Pages and Java Server Pages
    • Chapter 16: Using Java in Oracle Application Server
    • Chapter 17: Web-enabling Legacy Application Using Network Sockets
    • Chapter 18: Web-enabling Legacy Application Using JNI
    • Chapter 19: Accessing Oracle Advanced Queuing Through Java
    • Chapter 20: Using Oracle Replication to Build Distributed Systems
  • Part IV: Oracle8i: The Internet Database (The Engine Room) covers Java components in the database. The chapters in this section guide you through development and deployment of Session Enterprise JavaBean in the Oracle8i database, use of security, and transaction management services provided by the Oracle8i Enterprise JavaBean container. Two chapters are devoted to developing Java application code to be deployed as CORBA objects inside the Oracle8i database engine. The chapter titles are:
    • Chapter 21: Enterprise JavaBeans: An Introduction
    • Chapter 22: Deploying and Using Enterprise JavaBeans
    • Chapter 23: CORBA and its Implementation in Oracle8i: An Overview
    • Chapter 24: Advanced CORBA topics

From this structure it should be evident there is much breadth and depth in the material. Therefore, we trust you will find this book a valuable resource for your work using Java and Oracle technology.

Downloading Oracle Software

The Oracle Technology Network (OTN) is an industry-first Developer Service Provider (DSP) that offers a broad set of services for developing, testing, and deploying Oracle-based solutions and applications. These include a supporting workplace environment for online collaborative development, online support with access to Oracle and industry experts, as well as free software downloads, technical libraries, and a job marketplace for Oracle-related positions. Membership is FREE, and so is the latest development software. Join OTN today at http://www.oracle.com/books/

You can also join and visit Oracle Technology network at http://technet.oracle.com

Author Notes

Before we embarked on the project resulting in this book, Elio had seen his first efforts as an author come to fruition with release of his book "Software Engineering with Oracle," published by Prentice Hall. Elio was actively involved in several projects as an architect for Java based systems, and had run out of time and space to include Java material in a book devoted to designing and developing C/C++ based applications with Oracle. In my case, I had been actively teaching Java courses and providing consulting services for Java and database related projects.

Elio had indicated a crazy desire (in his own terms, and with hindsight I agree) to write about Java and Oracle, which had become a passion for him as it was for me. My involvement in this book began with an idle suggestion that Elio should consider writing a book about Java and Oracle with a coauthor (i.e. me), saving him the monstrous effort of writing yet another book by himself. We both laughed off the suggestion and I thought it was dropped, until two weeks later Elio called me and said I was employed as a coauthor and that Prentice Hall jumped at the suggestion.

We soon embarked on a six month plan to write an advanced book on Java and Oracle, assuming that our audience would already know the basics of using Oracle SQL and PL/SQL, and had core Java programming skills under their belt.

After some initial reviews it became evident that our plan was perceived to be too complex. After all, that's what we embarked on and that was our initial intent. Elio and I relented to suggestions to simplify the content and ease the reader into the more complex topics. This involved a redesign of a book, which started out with 5 huge chapters broken into lots of smaller digestible pieces, twenty-four chapters organized into 4 logical parts to be exact. This resulted in more manageable pieces of information for you as the reader, but it took much longer to complete, eighteen instead of the original six months. The time to complete this book increased for several reasons:

  • Elio and I were writing in our spare time. This generally amounted to 3 or 4 hours a night and, in some cases, all nighters resulting in sandy eyes and short tempers.
  • The work load in our respective jobs increased due to the changes in software versions hitting the market.
  • With the new versions of software available, we endeavored to update our code and commentary, but had to stop to avoid the never ending catch up trap that one can fall into in these circumstances.
  • My wife Sharon was pregnant with our first child, who was born in the latter stages of writing this book. My best intention was to have finished this book before my son Michael was born, but life circumstances were getting in the way, making the task of completing the project even more of a challenge. My focus in spare hours was joyfully with my family, and the late nights got later and longer.

I share this information with you as a way of documenting the journey that I took to complete the creation of this book, not as a list of excuses. Now I am the proud father of two: Michael and this book. The more important one arrived first!

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020