Database development java oracle

Database development java oracle

Oracle Database 2 Day + Java Developer’s Guide, Release 19c

Copyright © 2007, 2019, Oracle and/or its affiliates. All rights reserved.

Primary Author: Tanmay Choudhury

Contributing Author: Tulika Das

Contributors: Kuassi Mensah, Nirmala Sundarappa

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are «commercial computer software» pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Источник

Database development java oracle

Oracle provides enterprise application developers an end-to-end Java solution for creating, deploying, and managing Java applications. The total solution consists of client-side and server-side programmatic interfaces, tools to support Java development, and a JVM integrated with Oracle Database. All these products are fully compatible with Java standards. This section covers the following topics:

1.6.1 Java in Database Application Development

The most important features of Java in database application development are:

  • Designing data-bound procedures and functions using Java SE APIs and JDBC.
  • Extending the reach and capabilities of the database with standard and third-party Java libraries. For example, accessing third-party databases using their drivers in the database and accessing Hadoop/HDFS.
  • Providing flexible partitioning of Java2 Platform, Standard Edition (J2SE) applications for symmetric data access at the JDBC level.
  • Bridging SQL and the Java2 Platform, Enterprise Edition (J2EE) world by:
    • Calling out Web components, such as JSP and servlet
    • Bridging SQL and Web Services using Web Service Callouts

    1.6.2 Java Programming Environment Usage

    In addition to the Oracle JVM, the Java programming environment provides:

    • Java stored procedures as the Java equivalent and companion for PL/SQL. Java stored procedures are tightly integrated with PL/SQL. You can call Java stored procedures from PL/SQL packages and PL/SQL procedures from Java stored procedures.
    • The JDBC and SQLJ programming interfaces for accessing SQL data.
    • Tools and scripts that assist in developing, loading, and managing classes.

    The following table helps you decide when to use which Java API:

    To have a Java procedure called from SQL, such as a trigger.

    To call a static, simple SQL statement from a known table with known column names from a Java object.

    To call dynamic, complex SQL statements from a Java object.

    1.6.3 Java Stored Procedures

    Java stored procedures are Java programs written and deployed on a server and run from the server, exactly like a PL/SQL stored procedure. You invoke it directly with products like SQL*Plus, or indirectly with a trigger. You can access it from any Oracle Net client, such as OCI and PRO*, or JDBC or SQLJ.

    In addition, you can use Java to develop powerful, server-side programs, which can be independent of PL/SQL. Oracle Database provides a complete implementation of the standard Java programming language and a fully compliant JVM.

    Related Topics

    1.6.4 PL/SQL Integration and Oracle RDBMS Functionality

    You can call existing PL/SQL programs from Java and Java programs from PL/SQL. This solution protects and leverages your PL/SQL and Java code and opens up the advantages and opportunities of Java-based Internet computing.

    Oracle Database offers two different Java APIs for accessing SQL data, JDBC and SQLJ. Both these APIs are available on the client, and the JDBC API is also available on the server. As a result, you can deploy your applications on the client and server.

    The following topics introduce the Java APIs provided by Oracle Database:

    1.6.4.1 JDBC Drivers

    JDBC is a database access protocol that enables you to connect to a database and run SQL statements and queries to the database. The core Java class libraries provide the following JDBC APIs: java.sql and javax.sql . However, JDBC is designed to enable vendors to supply drivers that offer the necessary specialization for a particular database. Oracle provides the following distinct JDBC drivers:

    You can use the JDBC Thin driver to write pure Java applications and applets that access Oracle SQL data. The JDBC Thin driver is especially well-suited for Web-based applications and applets, because you can dynamically download it from a Web page, similar to any other Java applet.

    The JDBC OCI driver accesses Oracle-specific native code, that is, non-Java code, and libraries on the client or middle tier, providing performance boost compared to the JDBC Thin driver, at the cost of significantly larger size and client-side installation.

    JDBC server-side internal driver

    Oracle Database uses the server-side internal driver when the Java code runs on the server. It allows Java applications running in the Oracle JVM on the server to access locally defined data, that is, data on the same system and in the same process, with JDBC. It provides a performance boost, because of its ability to use the underlying Oracle RDBMS libraries directly, without the overhead of an intervening network connection between the Java code and SQL data. By supporting the same Java-SQL interface on the server, Oracle Database does not require you to rework code when deploying it.

    Related Topics

    Источник

    Oracle Developer Live – Oracle Database

    Watch technical sessions, demos, panels, and Q&A with experts on demand.

    Connect Java Apps to Database using JDBC

    Watch

    Learn how to connect your Java app to Autonomous Transaction Processing in 4 easy steps.

    Watch the featured video (4:52)

    Build

    Develop Java applications with Oracle Database using JDBC.

    Learn

    Using JDBC, the Universal Connection Pool (UCP) and the embedded JVM (OJVM) through technical articles, white papers, code samples, FAQs and more.

    Database Resources for Java Developers

    Autonomous Databases

    Learn about Oracle Autonomous Databases – ATP, ADW, AJD and how to develop and connect Java applications.

    Database Cloud Services

    Learn about various Elastic Database Services provided by Oracle Cloud Infrastructure and how to connect your Java Applications.

    MySQL Database Service

    Learn about the world’s leading database — MySQL Database Service fully managed by Oracle and how to connect Java applications.

    NoSQL Database Cloud Service

    NoSQL Database is designed to offer highly reliable, flexible, and available data management across a configurable set of storage nodes with cloud native Java Applications.

    Java and Databases Technology explanation 01

    Getting started with Oracle JDBC for Oracle Database

    Learn how to connect to the Oracle databases using JDBC.

    Источник

    Читайте также:  Java double number to string
Оцените статью