Skip to content

Commit 16240ea

Browse files
committed
update README
1 parent bfab772 commit 16240ea

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

JdbcExamples/README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# JDBC and JSON in Oracle Database 23c
1+
# JDBC and JSON in Oracle Database
22

33
This directory contains examples of how to store and access JSON type values in Oracle Database from a Java program.
44

@@ -10,6 +10,7 @@ This directory contains examples of how to store and access JSON type values in
1010
* [movie.Update](src/main/java/movie/Update.java) - Updates an movie record using whole document replacement.
1111
* [movie.UpdateMerge](src/main/java/movie/UpdateMerge.java) - Performs a partial update using JSON_MERGEPATCH().
1212
* [movie.UpdateTransform](src/main/java/movie/UpdateTransform.java) - Performs a partial update using JSON_TRANSFORM().
13+
* [movie.GetAllDataBind](src/main/java/movie/GetAllDataBind.java) - Loads JSON directly into Java objects using Jackson databind
1314
* [movie.JSONP](src/main/java/movie/JSONP.java) - Inserts and retrieves a value using [JSON-P (jakarta.json)](https://javaee.github.io/jsonp/) interfaces.
1415
* [movie.JSONB](src/main/java/movie/JSONB.java) - Stores and retrieves a plain/custom Java object as JSON using [JSON-B (jakarta.json.bind)](https://javaee.github.io/jsonb-spec/).
1516
* [movie.Jackson](src/main/java/movie/Jackson.java) - Encodes JSON from an external source, in this case a Jackson parser, as Oracle binary JSON and inserts it into the table.
@@ -18,21 +19,21 @@ This directory contains examples of how to store and access JSON type values in
1819
* [movie.DropTable](src/main/java/movie/DropTable.java) - Drops the table used by the examples.
1920

2021
See also:
21-
* Documentation: [The API for JSON type in Oracle Database (oracle.sql.json)](https://javadoc.io/static/com.oracle.database.jdbc/ojdbc8/21.4.0.0/oracle/sql/json/package-summary.html#package.description)
22+
* Documentation: [The API for JSON type in Oracle Database (oracle.sql.json)](https://javadoc.io/static/com.oracle.database.jdbc/ojdbc17/23.9.0.25.07/oracle/sql/json/package-summary.html#package.description)
23+
* Video (YouTube): [Java One 2025: SQL, JSON, and Java](https://www.youtube.com/watch?v=W8k9ZCrsphc)
2224
* Video (YouTube): [AskTom Office Hours: The Java API for JSON type in Oracle JDBC](https://youtu.be/jg5d15-2K3Y)
2325

24-
Need help, talk to us on Slack:
25-
* Join oracledevrel: https://join.slack.com/t/oracledevrel/shared_invite/zt-1h0fhz7f8-gHM298rFasYzlTn0Nii2sQ
26-
* Channel: #oracle-db-json
27-
2826
## Running the examples
2927

3028
### Create a database
3129

32-
These examples should be run against Oracle Database 23c.
33-
See:
30+
These examples must be run against Oracle Database 23c or later. You can either run the database yourself: <br/>
3431
[https://www.oracle.com/database/free/get-started/](https://www.oracle.com/database/free/get-started/)
3532

33+
Or, you can use an always-free Autonomous Database in the cloud: <br/>
34+
[https://github.com/oracle/json-in-db/blob/master/JdbcExamples/adbs/README.md](https://github.com/oracle/json-in-db/blob/master/JdbcExamples/adbs/README.md)
35+
36+
3637
### Setup the examples
3738

3839
1. Clone these examples from github. For example:
@@ -53,20 +54,32 @@ See:
5354
5455
### Run the examples
5556
57+
If you are running Oracle Database 23ai Free yourself, then the connection string will look like this:
58+
```
59+
jdbc:oracle:thin:user/password@//localhost:1521/freepdb1
60+
```
61+
62+
If you are using the Autonomous Database, the connection string will look something like this:
63+
```
64+
jdbc:oracle:thin:admin/mypass@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1521)(host=adb.us-phoenix-1.oraclecloud.com))(connect_data=(service_name=k1sf7opduakoqs_jsondemo_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))
65+
```
66+
See [adbs/README.md](https://github.com/oracle/json-in-db/blob/master/JdbcExamples/adbs/README.md) for instructions on obatining the connection string for your database.
67+
68+
5669
1. Run all the examples:
5770
5871
```
5972
mvn -q exec:java \
6073
-Dexec.mainClass="movie.RunAll" \
61-
-Dexec.args='jdbc:oracle:thin:user/password@//localhost:1521/freepdb1'
74+
-Dexec.args='<connection string>'
6275
```
6376
6477
2. Drop the table used by the examples:
6578
6679
```
6780
mvn -q exec:java \
6881
-Dexec.mainClass="movie.DropTable" \
69-
-Dexec.args='jdbc:oracle:thin:user/password@//localhost:1521/freepdb1'
82+
-Dexec.args='<connection string>'
7083
7184
```
7285
@@ -75,5 +88,5 @@ See:
7588
```
7689
mvn -q exec:java \
7790
-Dexec.mainClass="movie.CreateTable" \
78-
-Dexec.args='jdbc:oracle:thin:user/password@//localhost:1521/freepdb1'
91+
-Dexec.args='<connection string>'
7992
```

0 commit comments

Comments
 (0)