Use Cases for Oacle Pluggable Databases in Development Environments
1. Use Cases for
Oracle Pluggable Databases
in Development Environments
Concepts not restricted to Oracle Databases
2. Oracle Multitenant Architecture
«The multitenant architecture enables an Oracle database to function as a
multitenant container database (CDB).»
«A CDB includes zero, one, or many customer-created pluggable databases
(PDBs).»
«A PDB is a portable collection of schemas, schema objects, and nonschema
objects that appears to an Oracle Net client as a non-CDB. All Oracle databases
before Oracle Database 12c were non-CDBs.»
Quoted from
https://docs.oracle.com/database/121/CNCPT/cdbovrvw.htm#CNCPT89236
Use Cases for Oacle Pluggable Databases in
Development Environments
3. Advantages of Multitenant Architecture for Development
§ A pluggable database behaves just like a regular database
§ Allows dynamic creation and deletion of pluggable databases
§ Pluggable databases can easily be cloned
§ No need to use container technologies like docker
– can be an advantage
Use Cases for Oacle Pluggable Databases in
Development Environments
4. Use Case #1 – Multiple PDBs for Each Developer
Use Cases for Oacle Pluggable Databases in
Development Environments
BASE
JOHN_
REL_A
JOHN_
PATCH
…
JOHN_
REL_B
BOB_
REL_A
BOB_
REL_B
John Bob
Clone
BASE database can define
for instance all required DB
schemas
5. Use Case #2 – Share DB-States Within a Team
Use Cases for Oacle Pluggable Databases in
Development Environments
BASE
JOHN_
REL_A
JOHN_
PATCH
…
JOHN_
REL_B
BOB_
REL_B
John Bob
Clone
6. Use Case #3 – Snapshot DB-State (Objects and Data)
and Use It repeatedly
Use Cases for Oacle Pluggable Databases in
Development Environments
BASE
JOHN_
REL_B
BOB_
REL_B
John Bob
Clone
TEST_
DATA
Clone – Drop – Clone – …
Build up a specific state, e.g.
a specific test data set
7. Use Case #4 – Use a PDB for Test Execution
Use Cases for Oacle Pluggable Databases in
Development Environments
BASE
Clone
13ds9j
Create
DDL /
DML
DML
Drop
Build-Pipeline
PDB Setup
DB Setup
(e.g. via
Flyway)
Test
Execution
PDB
Cleanup
Same concept as using a «database service» in CI which is spin up as docker instance
8. Rütlistrasse 7
3014 Bern
! +41 31 533 42 28
" contact@codeblock.ch
# www.codeblock.ch
$
Use Cases for Oacle Pluggable Databases in
Development Environments