Internet Features   «Prev  Next»

Lesson 1

Internet and Cloud Connectivity in Oracle AI Database 26ai

Oracle AI Database 26ai connects to applications through database drivers, Oracle Net Services, and web APIs. These technologies support on-premises, cloud, and hybrid deployments. Understanding where each component runs helps you choose a connection method, protect data in transit, and manage application connections efficiently.

This lesson introduces JDBC, Oracle REST Data Services (ORDS), connection pooling, and two-tier and three-tier architectures. It also explains how applications can work with JSON documents and multimedia content without confusing data storage with media processing.

Evolution of Internet Connectivity

Modern Oracle applications build on the same foundation used by earlier client-server systems: a client establishes a database session and executes SQL or PL/SQL. Web applications commonly place an application or API tier between the end user and the database. REST APIs extend the available integration choices; they do not universally replace SOAP or direct database connections.

ORDS is useful both on premises and in the cloud. A browser normally calls an HTTPS application or API endpoint rather than opening a JDBC connection to the database.

Integrating Multimedia and Internet Applications

Applications can store images, audio, video, and documents in BLOB columns, while character content can use CLOB columns. SecureFiles is Oracle's modern LOB storage architecture. Encryption at rest must be configured using the applicable database encryption features; the name SecureFiles does not mean every LOB is automatically encrypted.

Another design stores large media objects in object storage and keeps identifiers, descriptions, permissions, and other metadata in Oracle tables. The application controls access to the files and maintains consistency between their storage locations and database records.

Client and Server Communication with JDBC

JVM application uses optional UCP pooling and the JDBC Thin driver to connect through Oracle Net to an Oracle AI Database 26ai service.
Figure 1: JDBC Thin provides database connectivity; UCP optionally manages reusable application connections. Configure transport security for the database connection.

Java Database Connectivity (JDBC) provides an interface for Java and other JVM languages, including Kotlin and Scala. Oracle's JDBC Thin driver is a pure Java driver that does not require an Oracle Client installation. It communicates with Oracle through Oracle Net over the network.

Connection configuration identifies a database service, usually a service for the application's pluggable database (PDB). The listener handles the initial connection request and directs it to the appropriate database service handler. Credentials, network reachability, and any required TLS trust configuration must also be in place.

Example: Execute a Parameterized Query

The following Java class accepts a configured DataSource. Configure the data source outside this method with the database service, application credentials, and required security settings. Use an account authorized to query the example PRODUCTS table, which contains PRODUCT_NAME and numeric PRICE columns.

import java.math.BigDecimal;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.sql.DataSource;

public final class ProductQueries {
    public static void listProducts(DataSource dataSource,
                                    BigDecimal minimumPrice)
            throws SQLException {
        String sql = "SELECT product_name, price FROM products "
                   + "WHERE price > ?";

        try (Connection connection = dataSource.getConnection();
             PreparedStatement statement = connection.prepareStatement(sql)) {
            statement.setBigDecimal(1, minimumPrice);

            try (ResultSet results = statement.executeQuery()) {
                while (results.next()) {
                    System.out.println(results.getString("product_name")
                            + ": " + results.getBigDecimal("price"));
                }
            }
        }
    }
}

The bind parameter separates the price value from the SQL text. Try-with-resources closes the result set, statement, and connection, including when an exception occurs. With an application pool, closing the borrowed connection normally returns it to the pool for reuse.

Application Pooling and Database-Side Pooling

Oracle Universal Connection Pool (UCP) manages connections in Java applications. Configure its size and timeout settings for the workload and database capacity. A DataSource interface alone does not imply pooling, and using an Autonomous database does not automatically pool connections created by application code.

Database Resident Connection Pooling (DRCP) is a separate, database-side capability that pools server resources. It can complement application pooling when supported and configured. UCP and DRCP operate at different layers and should not be treated as interchangeable.

Two-Tier and Three-Tier Architecture

Presentation clients communicate over HTTPS with an application tier that manages business logic and database connections to Oracle AI Database 26ai.
Figure 2: A three-tier architecture separates presentation, application processing, and database services.

Two-Tier Architecture

In a two-tier design, a client application connects directly to the database through a database driver and Oracle Net. Administrative tools and desktop applications often use this arrangement. Connection counts, credentials, and application deployment must be managed across the clients. Two-tier architecture does not inherently prohibit pooling, but it provides no shared application tier to centralize it.

Three-Tier Architecture

In a three-tier design, browsers or mobile clients communicate with an application tier, usually over HTTPS. That tier implements business rules and accesses Oracle using an appropriate driver. A Java application built with Spring Boot or Jakarta EE can use JDBC; a Node.js application can use node-oracledb. ORDS can provide a REST API tier backed by database operations.

Oracle Cloud and Secure Network Connectivity

Oracle Cloud Infrastructure (OCI) provides Virtual Cloud Networks (VCNs), subnets, routing, and network access controls. The database service and endpoint configuration determine how applications reach a database. A cloud deployment is not automatically private merely because it runs in OCI.

Oracle AI Database 26ai supports TLS 1.3, but the protocol actually used depends on compatible clients and server configuration. Configure certificate validation and the required authentication method. Mutual TLS, which also authenticates the client using a certificate, is a specific configuration rather than a requirement for every connection.

Secure each communication hop independently. HTTPS between a browser and an application does not automatically encrypt the application's database connection. Similarly, storage encryption and network encryption protect different parts of the system.

Module Objectives

This module develops the concepts needed to:

  1. Distinguish database-driver connections from REST API access.
  2. Explain two-tier and three-tier Oracle application architectures.
  3. Describe the separate roles of application pooling and database-side pooling.
  4. Identify network, authentication, and encryption requirements for cloud and on-premises connectivity.
  5. Explain how LOB storage, JSON, relational data, and external media services support internet applications.

The next lesson examines multimedia storage and management, including the distinction between storing media in Oracle and processing it with application or external services.

Oracle Documentation


SEMrush Software 1 SEMrush Banner 1