oracle-samples / oracle-db-examples

Examples of applications and tool usage for Oracle Database
https://www.oracle.com/database/technologies/
Other
1.31k stars 834 forks source link

Add spring sharding demo #308

Closed meedbek closed 7 months ago

meedbek commented 8 months ago

Adding a demo application demonstrating the use of the latest sharding feature in Spring Framework with the Oracle Database.

There are two versions one that uses JPA to access data in the database, and a second one that uses JdbcTemplate

jeandelavarene commented 7 months ago

Looks good for most of it, please check the couple of comments I've left in the files.

How will a user ever uninstall these samples? There is a tablespace being created, etc. Do we expect users just to destroy the entire sharded database environment after they run these sample applications or is there a need for an uninstall script that can be run that will clean up the environment?

@gvenzl this is what was added to address you comment:


To uninstall and clean up the preceding setup, you can connect as sysdba and run the following SQL script.

~~~SQL
ALTER SESSION ENABLE SHARD DDL;

DROP USER demo_user CASCADE;
DROP TABLESPACE SET TS1;
~~~