Oracle Essentials Oracle Database 11g (62 page)

Oracle Database 10
g
added web services used in triggering database operations via nonconnected clients. Web services capabilities in the database include SQL, PL/SQL, embedded Java, JDBC, HTTP client, and SOAP client, and are combined with those in Oracle Application Server (Java, J2EE, JDBC, HTTP, SOAP server, and XML). The database can act as a web services consumer or provider and can be exposed using JPublisher, Oracle’s utility for generating Java classes that represent user-defined database entities.

As of Oracle Database 11
g
, the database can be treated as a service provider in a Service-Oriented Architecture (SOA) environment using the XDB HTTP Server for SOA. PL/SQL packages, procedures, and functions can be exposed as web services.

Dynamic SQL and XQuery queries can be executed when deploying the database in this manner.

Enterprise JavaBeans

Server-side Java components are referred to as Enterprise JavaBeans (EJB) in contrast to client-side reusable interface components, which are referred to as simply JavaBeans. Youcan deploy EJBs in the database server or with Oracle Application Server. The tight integration of the Java Virtual Machine in the database makes use of database System Global Area (SGA) memory-management capabilities to provide EJB server scalability beyond what would be expected in most JVM implementations. For example, each client within the JVM requires only about 50-150 KB of memory for session state.

In its initial release, Oracle8
i
supported the
session bean
, which is an EJB created by a specific call from the client that usually exists only during a single client/server session. Session beans may be
stateless
, allowing the EJB server to reuse instances of the bean to service clients, or
stateful
(i.e., bound to clients directly). Database cache information maintained by stateful session beans is synchronized with the database when transactions occur by using JDBC or SQLJ.
Entity Java beans
, also known as
persistent beans
(because they remain in existence through multiple sessions), were not supported in Oracle8
i
but are supported in Oracle9
i
and subsequent database JVMs. The third type of EJB is the
message-driven bean
, designed to receive asynchronous Java Message Services (JMS) messages and supported via Oracle’s more recent Applications Servers that support EJB 3.0.

Object-Oriented Development

|

323

Extensibility Features and Options

Oracle’s extensibility features and options extend SQL to perform tasks that can’t otherwise be easily programmed in a relational database. These include manipulation of text, multimedia and content, and spatial data. These features are typically used by application developers but are sometimes bundled with applications sold by Oracle partners.

Oracle Multimedia and Oracle Text

Oracle Multimedia (formerly known as
inter
Media) has been included with the database since version 8.1.6 of Oracle8
i.
In Oracle9
i
, the product’s text features became known as Oracle Text. These features were available as options in previous versions of Oracle:

• The Text Management feature was formerly known as the ConText Option.

• The Location Services evolved from the Spatial Option and supports the location queries and the geocoding described later, in the “Oracle Spatial” section.

• Image storage and manipulation features were formerly bundled in the Image Option.

Additionally, the product extensions enable the storage and manipulation of audio and video clips including extraction of content and organizing metadata as a CLOB

in XML format. Oracle has positioned Oracle Multimedia and Oracle Text as being useful features for applications that typically include multiple media types since the features integrate all of these key datatypes and their associated functions. Oracle Multimedia and Oracle Text utilize a number of underlying database storage

options, which are described in Table 14-1.

Table 14-1. Storage options for Oracle Multimedia and Oracle Text
Type

Storage options

Text/images

VARCHAR2

BLOB

CLOB

VARCHAR

CHAR

LONG

LONG RAW

Object attribute

Master-detail stores (in which the master table identifies the text or image and the detail table contains the content)

BFILEs

URLs that point to content

DICOM

324

|

Chapter 14: Oracle Extended Datatypes

Table 14-1. Storage options for Oracle Multimedia and Oracle Text (continued)
Type

Storage options

Audio and video

BLOB

clips

BFILE

URLs that point to content

Locator ordinates

VARRAYs

Oracle Database 10
g
was enhanced to store large documents of up to 128 terabytes in LOBs. Oracle Database 11
g
Multimedia object type media size limits are extended to those of BLOBs (between 8 and 128 terabytes). Also introduced in this version of Multimedia is a new, higher-performing BLOB implementation accessible via Oracle’s SecureFiles.

Oracle Multimedia and Oracle Text support a number of commonly used formats:

• Documents can be indexed while stored in formats such as ASCII, Microsoft Word, Excel, and PowerPoint, WordPerfect, HTML, XML, and Adobe Acrobat (PDF).

• Audio formats supported include AU, AIFF, AIFF-C, WAV, MPEG1, MPEG2, and MPEG4 audio formats.

• Video formats supported include Apple QuickTime 3.0, AVI, video MPEG formats (MPEG and MP4), and Real Networks Real video format (RMFF).

• Image formats supported include BMPF, CALS, FPIX, GIFF (gif), JFIF (jpeg), PBMF, PGMF, PPMF, PPNF, PCXF (pcx), PICT, PNGF, RPIX, RASF, TGAF, TIFF, and WBMP. Image-compression formats supported include ASCII encoding, BMPRLE, DEFLATE, DEFLATE-ADAM7, FAX3, FAX4, GIFLZW,

GIFLZW-INTERLACED, HUFFMAN3, JPEG, JPEG-PROGRESSIVE, LZW,

LZWHDIFF, NONE, PACKBITS, PCXRLE, RAW, SUNRLE, and TARGARLE.

• As of Oracle Database 11
g
, Digital Imaging and Communications in Medicine (DICOM) version 3, a medical imaging standard, is supported. The database includes support for single-frame and multiframe images, waveforms, 3-D volume slices, video segments, and structured support. Methods and functions are available to convert DICOM to JPEG, GIF, PNG, TIFF, and other formats.

Metadata can be extracted into XML documents or custom mappings can be created.

With Oracle’s text-management capabilities, youcan identify the strongest theme (or
gist
) of a document and generate document summaries based on that theme. Oracle Database 10
g
additions included theme (NEAR) proximity searching and the ability to determine the character set and language of documents with unknown content.

Searching capabilities include full-text searches for word and phrase matching, theme searches, and mixed searches for both text and nontext data. As of Oracle Database 10
g,
native indexing columns of type XMLType using Oracle Text are supported.

Extensibility Features and Options

|

325

Since typical users of Oracle text management are often news services that publish news items to interested users via the Web, recent database releases include an algorithm for determining the popularity rankings of web pages and content. Also included since Oracle Database 10
g
is an easy, custom text application building interface through JDeveloper with a text application generator, a catalog search application generator wizard, and a classification training set wizard.

Image support in the Oracle database includes conversion among image and compression formats, access to raw pixel data, and support for basic image-manipulation functions such as scaling and cropping.

Clients can access audio and video files through Java Media Framework (JMF) players. (Java Advanced Imaging in Oracle9
i
and more recent releases also provide image support through JMF.) Streaming servers such as the Real Networks Server can also deliver audio and video content on demand.

You can also access images, audio, and video stored in Oracle and Multimedia through C++, Java, OCI, or PL/SQL. Oracle Database 10
g
and newer database release image object types support the SQL/MM Still Image standard, ISO/IEC

13249-5 SQL and support for the Sun Microsystems Java Advanced Imaging (JAI) package for storing and processing content. DICOM content stored in Oracle Database 11
g
is accessible using Java and PL/SQL APIs.

Audio, video, and images stored using Multimedia might also be included as part of a web site using a variety of web-authoring tools. Content services are provided to the Portal in Oracle Application Server, Oracle JDeveloper, and various Oracle partners.

Oracle Content Management

Oracle’s Content Database Suite provides core document services in the Oracle database and the infrastructure needed to build document management applications.

Content DB provides the repository and the Content Server manages the documents. The suite can be used for file server consolidation, management of document policies and procedures, document sharing and collaboration, and as a content repository for applications.

In 2007, Oracle completed the acquisition of Stellent and began providing a more complete content management framework and suite of applications called Universal Content Management (UCM). UCM consists of an enterprise content management suite that supports document management, web content management, digital asset management, and records management.

A third pillar in Oracle’s content management offerings is Imaging and Process Management (IP/M) supporting process-oriented imaging applications for Oracle’s E-Business Suite, PeopleSoft, and JD Edwards products. Modules supported include accounts payable and receivable automation, travel and expense automation, and HR and application processing.

326

|

Chapter 14: Oracle Extended Datatypes

When deploying such an infrastructure, extensive records management and security are often stated requirements. Oracle’s Universal Records Management (URM) provides unified consistent records and central policy retention management for Oracle’s enterprise content management solutions. The content repositories are accessed through adapters. For example, URM in combination with a Content DB

adapter is a replacement for Oracle’s earlier Records DB offering.

Information Rights Management (IRM) can be deployed to issue Secure Keys from an IRM Server, controlling access to and securing sensitive content. IRM enables management of centralized policies, auditing, monitoring, encryption, and rights revocation.

Oracle Ultra Search

Ultra Search provides search and location information for text in Oracle databases, other ODBC-accessible databases, Oracle Portal repositories, IMAP mail servers, HTML documents available from web servers, and other files. Oracle database version 8.1.7 introduced Ultra Search, leveraging Oracle Text. Today, Ultra Search is included with the Oracle database and the Oracle Application Server.

Ultra Search gathers information using a Java process
crawler
started by Oracle on a set schedule. The crawler indexes the documents residing on various servers using Oracle Text, and then stores this information in an Oracle database. The Ultra Search administration tool is a J2EE-compliant web application. Application builders can invoke Ultra Search using PL/SQL or Java procedures and use the APIs to make crawler results “searchable.”

In Oracle Application Server, Ultra Search is located in the metadata repository.

Application Server users can search and receive a list of results through a portlet that can be accessed through Oracle Portal.

In a secure search, document retrieval is based on user access rights. An access control list (ACL) is evaluated during such a secure search. The ACLs are stored in XML

DB.

Ultra Search requires management skills commonly found where Oracle databases and Application Servers are deployed. For organizations wanting to deploy content search without those skills, Oracle offers Secure Enterprise Search (SES) with plug-ins for a wide variety of data sources and commonly deployed Internet directories.

Oracle Spatial Option

Spatial data is data that contains location information. The Oracle Spatial Option provides the functions and procedures that allow spatial data to be stored in an Oracle database and then accessed and analyzed according to location comparisons.

Extensibility Features and Options

|

327

An example of using spatial query functions to combine spatial and standard relational conditions would be to “find all homes within two square miles of the intersection of Main Street and First Avenue in which the residents’ income is greater than $100,000, and show their location.” This query might return a list of home addresses or, when used with a Geographic Information System (GIS), plot the home locations on a map, as shown in
Figure 14-2.
Geocoding matches references such as addresses, phone numbers (including area codes), and postal codes (with longitude and latitude), which are then stored in the database.

Other books

Forgotten Honeymoon by Farr, Beverly
Twisted Winter by Catherine Butler
Magic Hours by Tom Bissell
The Horse Whisperer by Nicholas Evans
Gimme Something Better by Jack Boulware
TransAtlantic by McCann, Colum
Courage Dares by Nancy Radke