Oracle Database 23c Free — Developer Release for Java Developers with Docker on Windows

Juarez Junior
Oracle Developers
Published in
8 min readMay 2, 2023

--

Oracle Database 23c Free — Developer Release

by Juarez Junior

Introduction

As you may have heard, Oracle recently released the Oracle Database 23c Free — Developer Release, an accessible, free, yet feature-complete offering of the industry-leading Oracle Database.

You can download it straight from the Internet without an oracle.com user account or license click-through requirements. It enables simple and fast access to the world’s only converged database that supports all data models and workload types.

Announced and released at the regional Oracle Cloud World (OCW) in Singapore, it’s available for download now.

Oracle Database 23c Free — Developer Release

Oracle Database 23c Free–Developer Release includes:

  • JSON Relational Duality: Developers can build applications in either relational or JSON paradigms with a single source of truth and benefit from the strengths of both — relational and document models. Data is held once but can be accessed, written, and modified with either approach. Developers benefit from the best of both JSON and relational models, including ACID-compliant transactions and concurrency controls, which means they no longer have to make tradeoffs between complex object-relational mappings or data inconsistency issues.
  • JavaScript Stored Procedures (powered by GraalVM): JavaScript code can now be executed closer to data than ever before by writing JavaScript Stored Procedures or loading existing JavaScript libraries into Oracle Database. Support for JavaScript code improves developer productivity by allowing the reuse of existing business logic straight inside the data tier and the reuse of JavaScript developer skills. JavaScript code invocation can be intermixed with SQL and PL/SQL, providing polyglot programming language support.
  • JSON Schema: Developers can now ensure and validate JSON document structures via industry-standard JSON Schemas, enabling the confident and reliable use of the JSON data format.
  • Operational Property Graphs: Developers can now build both transactional and analytical property graph applications with Oracle Database, using its industry-leading, new SQL standard property graph queries support, including running graph analytics on top of both relational and JSON data.
  • Oracle Kafka APIs: Kafka applications can now run against Oracle Database Transactional Event Queues with minimal code changes. This enables much more robust microservices built using transactional events that perform event operations and database changes in a single atomic transaction.
  • SQL Domains: The new domain construct can act as lightweight type modifiers that centrally document intended data usage, extending and drastically improving SQL standard domains. This allows developers to better understand how data is used and improves overall data quality, without the complexity and incompatibility of usage-specific data types or user-defined types.
  • Annotations: Database metadata can now be stored directly alongside the data with the new annotation mechanism inside the Oracle Database. Developers can annotate common data model attributes for tables, columns, views, indexes, and more — providing a central, lightweight, declarative facility to register and exchange usage properties across applications. Storing the metadata along with the data guarantees consistency and universal accessibility to any user or application that uses the data.

For a comprehensive explanation of all the features above, please check the Oracle Database New Features Guide.

So without further ado, let’s give it a try!

Installation

By checking the download link, you will see that it is available as a Linux x64 RPM installation file (OL8 or RHEL8), so you may wonder how you can kick the tires and try it if you’re a Java Developer using Windows or macOS.

The good news is that there’s also a Container image available on Oracle Container Registry, a Docker image available on Docker Hub, and a VirtualBox VM that you can use to install it and test its amazing features.

Let’s try it quickly and easily and test it on Windows. To do so, first, run the docker pull command below:

docker pull gvenzl/oracle-free

Now, you can run the docker images command below to confirm that it was pulled properly:

Then, run the command below from the Windows Command Prompt (cmd):

docker run -d -p 1521:1521 -e ORACLE_PASSWORD=<your password> -v oracle-volume:/opt/oracle/oradata gvenzl/oracle-free

Replace <your password> above with your chosen password as required. The command above will run a new persistent database container (data is kept throughout container lifecycles).

If everything goes well, you can run the command docker ps -al to confirm that your container instance is up and running as expected.

Oracle Database 23c Free — Developer Edition — up and running

At a later point, if you want to change/updated the password, you can use the command below:

docker exec <container name|id> resetPassword <your password>

There are some additional options if you want to configure environment variables to support your connection details such as username, password, and other variables. Besides, you can check more details about the specific database user (SYS, SYSTEM, etc) you may want to use.

There are also details to run a new persistent database container, in which data is kept throughout container lifecycles.

Last, there are more details on how to use GitHub Actions as well. Please check the official landing page for the related Docker image on Docker Hub if you want to explore such options.

Now your database is installed! Let’s proceed to access it from both SQL Developer and Java!

Install SQL Developer

Oracle SQL Developer is also a free, integrated development environment that simplifies the development and management of Oracle Database in both traditional and Cloud deployments. It’s a handy tool for developers and students alike!

The installation process is quite straightforward. Please download and install SQL Developer from this page.

Open the Oracle SQL Developer tool, then create a New Database Connection as below.

Oracle SQL Developer -> New Database Connection

Configure your database connection details, including your password, then click the Test button to validate your connection, then click the Connect button to connect to it.

Oracle Database 23c Free — Developer Release — connection details

Provided that everything was configured properly, you can run a query to validate it. Copy the sample query below:

SELECT 'Hello World!' FROM dual;

Now, click the Run Statement button, below:

Oracle Database 23c Free — Developer Release — query execution

You should see the query results below. Now you can proceed to connect to your Oracle Database 23c Free instance from Java!

Connect to your Oracle Database 23c Free — Developer Release instance from a Java application with JDBC

Now, you can create a Java application to connect to your Oracle DB 23 Free instance with JDBC.

First, create a Maven project:

cd C:\java-projects\
mvn archetype:generate -DgroupId=com.oracle.dev.jdbc -DartifactId=java-jdbc-db23cfree-dev -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-simple -DinteractiveMode=false

Provided that everything is correct, you will see a confirmation message as shown below:

Maven — create a new Java project

Now, navigate to the root directory of your new project, and modify the pom.xml file to add the Oracle JDBC driver as a dependency as below:

Maven — add the Oracle JDBC driver

Save the pom.xml file, and run the mvn package command. Now, you can use a Java IDE (Integrated Development Environment) to open your project and create the required Java class.

You can use your preferred Java IDE such as Eclipse, IntelliJ, VS Code

As an example, navigate to the root directory of your new project, then run the Maven command below to create the project files required by Eclipse that will allow you to import your project:

C:\java-projects\java-jdbc-db23cfree-dev
mvn eclipse:eclipse

Provided that everything is correct, once again you will see a confirmation message as shown below:

Maven — create Eclipse project files

Now, open the Eclipse IDE and import your project as usual. Select File -> Import -> Existing Projects into Workspace, click the Next button, and then select your new project:

Eclipse — Import Existing Project into Workspace

Click the Finish button as shown above. Next, select your project, and open the sample App.java source code file:

Code sample — App.java

Copy the sample code and replace the existing source code for App.java with it, then replace [Username] and [Password] with your configured values:

Last, right-click the source code, then select Run As -> Java Application.

Again, your query will be executed and you will see the results below.

Java JDBC — query executed successfully

Wrapping it up

That’s it, now you can proceed to create your applications with Java, JDBC, and the Oracle Database 23c Free — Developer Release!

We hope you liked this blog post about the Oracle Database 23c Free — Developer Release for Java Developers with Docker on Windows.

We’ll explore many exciting topics, including the new JSON Relational Duality Views. Stay tuned!

References

Product — Oracle Database 23c Free — Developer Release

Technical Blog — Oracle Database 23c Free — Developer Release

Documentation — Oracle Database 23c Free — Developer Release

Forum — Oracle Database 23c Free — Developer Release

Oracle SQL Developer

Develop Java applications with Oracle Database

Developers Guide For Oracle JDBC 21c on Maven Central

Oracle Database JDBC Java API Reference, Release 21c

The Java Tutorials: JDBC Basics

Oracle JDBC FAQ

JDBC 4.3 API

JSR-000221 JDBCTM API 4.3 Maintenance Release 3

JSR 221: JDBCTM 4.0 API Specification

Oracle Developers and Oracle OCI Free Tier

Join our Oracle Developers channel on Slack to discuss the Oracle DB, Java, Oracle Cloud Infrastructure (OCI), and other topics!

Build, test, and deploy your applications on Oracle Cloud — for free! Get access to OCI Cloud Free Tier!

--

--