Use Case
Test Data Management

Optimizing Oracle database management, part 2: CDB, PDB, & key features

Author
Kirill Medvedev
August 20, 2024
Explore how to maximize usage of Oracle CDBs and PDBs in development environments with innovative ephemeral data solutions. Read on to learn more.
In this article
Share

CDB vs. PDB: Making the right choice

In part two of our series on Oracle database management for developers, we’ll look at the differences between using CDBs versus PDBs, and the advantages Tonic Ephemeral offers for each. Let’s get to it.

Explanation of Container Databases (CDB) and Pluggable Databases (PDB) 

To understand the power of Tonic Ephemeral's Oracle support, we need to dive into the world of Container Databases (CDB) and Pluggable Databases (PDB). These concepts, introduced in Oracle 12c, represent a significant shift in how Oracle databases are structured and managed.

Container Databases (CDB): Think of a CDB as a master database that can house multiple child databases. It's like a high-rise apartment building, providing the foundational structure and shared resources for all its occupants. A CDB manages the system-level operations, security, and resource allocation for all the databases it contains.

The beauty of CDBs lies in their efficiency. They allow for consolidated management of multiple databases, reducing overhead and simplifying administration tasks. When you're dealing with numerous databases, this consolidation can lead to significant resource savings and streamlined maintenance.

Pluggable Databases (PDB): If CDBs are the apartment building, PDBs are the individual apartments. Each PDB is a fully functional, self-contained database that plugs into a CDB. They have their own unique data and metadata but share the underlying system resources of the CDB.

PDBs offer remarkable flexibility. They can be easily created, cloned, or moved between CDBs, making them ideal for development and testing environments. Need to test a new feature? Spin up a new PDB. Want to isolate a specific application's data? Give it its own PDB.

The CDB-PDB architecture brings several advantages to the table. It allows for better resource utilization, easier management of multiple databases, and improved scalability. For developers, this translates to more efficient use of system resources and greater flexibility in creating and managing database environments.

Tonic Ephemeral leverages this architecture to provide developers with the best of both worlds. It can create a default CDB when you need a fresh start, or spin up specific PDBs when you're working with data from Tonic Structural. This flexibility allows you to tailor your database environment to your exact needs, whether you're working on a large-scale enterprise application or a focused, single-application project.

By understanding and utilizing CDBs and PDBs effectively, developers can create more efficient, manageable, and scalable database environments. And with Tonic Ephemeral, harnessing this power becomes as simple as a few clicks.

Use cases for CDB in Ephemeral

  • Fresh starts: When you need a clean slate, Ephemeral's default CDB creation is your go-to. It's perfect for initiating new projects or setting up isolated testing environments from scratch.
  • Resource optimization: If you're working on multiple small-scale applications or microservices, housing them in a single CDB can significantly reduce overhead. This approach is especially useful in resource-constrained development environments.
  • Centralized management: For teams managing multiple applications or services that don't require strict isolation, a CDB provides a centralized point of control. This can simplify tasks like backup, recovery, and patch management.
  • Consistent environment setups: When you need to ensure all team members have identical database environments, spinning up a standardized CDB can provide that consistency.

Scenarios where PDB is preferable

  • Application-specific testing: When testing features for a specific application, using a dedicated PDB allows you to isolate that application's data and schema. This isolation can prevent test interference and make debugging easier.
  • Rapid cloning and iteration: PDBs excel when you need to quickly clone a database for A/B testing or rapid prototyping. Ephemeral can swiftly create new PDBs based on existing ones, allowing for fast iteration.
  • Integration with Tonic Structural: When generating test data with Tonic Structural, Ephemeral automatically creates a PDB that matches your source database. This seamless integration ensures your test environment closely mirrors production.
  • Multi-tenancy simulation: If you're developing or testing a multi-tenant application, PDBs provide an excellent way to simulate this architecture, with each tenant getting its own PDB.
  • Easy portability: When you need to move a database between different environments (e.g., from development to staging), PDBs offer superior portability. They can be easily unplugged from one CDB and plugged into another.

The Ephemeral advantage: Deep dive

Rapid initialization using volume snapshots 

One of Tonic Ephemeral's standout features is its clever use of volume snapshots to dramatically speed up Oracle database initialization. This approach transforms what was once a time-consuming process into a near-instantaneous operation.

Screenshot of Snapshots UI in Tonic Ephemeral

Here's how it works: The first time Ephemeral starts an Oracle database from an image, it goes through the full initialization process. This initial setup might take a few minutes, as it involves all the usual steps of creating the database structure, setting up system tablespaces, and configuring basic parameters.

But here's where the magic happens—once this initial database is fully initialized, Ephemeral takes a snapshot of the entire volume. This snapshot is essentially a point-in-time copy of the fully initialized database, capturing all its structures and configurations.

From this point on, whenever you need to spin up a new Oracle database instance, Ephemeral doesn't start from scratch. Instead, it uses this snapshot as a launchpad. It's like having a fully baked cake ready to go, rather than having to mix the ingredients and bake it each time.

The benefits of this approach are substantial:

  1. Lightning-fast startup times: New database instances can be created in seconds rather than minutes or hours.
  2. Consistency across instances: Each new database starts from the same baseline, ensuring consistency in your development and testing environments.
  3. Resource efficiency: By bypassing the full initialization process, you save on computational resources and energy.
  4. Improved developer productivity: Less waiting means more time for actual development and testing.

This snapshot functionality is particularly powerful when combined with Ephemeral's container-based approach. It allows for the rapid creation of isolated, consistent database environments on demand. Whether you're setting up a new development environment, running automated tests, or quickly reproducing a bug, Ephemeral's rapid initialization ensures you're not left waiting.

By leveraging volume snapshots, Tonic Ephemeral removes one of the most significant bottlenecks in working with Oracle databases in development environments. It's a prime example of how smart, innovative approaches can transform traditionally cumbersome processes into streamlined, efficient operations.

Build better and faster with quality test data today.
Unblock data access, turbocharge development, and respect data privacy as a human right.

Automated password management for new database instances

In the world of database management, security is paramount. Yet, in development environments, it's often overlooked or handled inconsistently. Tonic Ephemeral tackles this challenge head-on with its automated password management for new Oracle database instances.

Every time Ephemeral spins up a new Oracle database, it automatically changes the SYS user password. This might seem like a small detail, but it's a game-changer for several reasons:

  1. Enhanced security: By ensuring each instance has a unique SYS password, Ephemeral significantly reduces the risk of unauthorized access. No more shared, static passwords that could potentially compromise your entire development environment.
  2. Compliance friendly: Automated password management helps meet security compliance requirements, even in non-production environments. It's a proactive step towards maintaining good security practices throughout the development lifecycle.
  3. Reduced human error: Let's face it—manually setting unique passwords for each database instance is tedious and error-prone. Automation eliminates the risk of weak or reused passwords set by developers in a hurry.
  4. Seamless developer experience: Despite the enhanced security, developers don't have to manage or remember these passwords. Ephemeral handles authentication information behind the scenes, allowing developers to focus on their work without security-related interruptions.

But Ephemeral doesn't stop at just changing passwords. It manages the entire lifecycle of these credentials, ensuring they're securely stored and accessible only to authorized processes and users. This means you get the benefits of robust security without the administrative overhead.

Moreover, this automated approach scales effortlessly. Whether you're creating one database or a hundred, each gets the same level of password protection. This consistency is crucial in maintaining a secure development environment as your projects and team grow.

By automating password management, Tonic Ephemeral removes a significant security burden from developers and database administrators. It's a perfect example of how Ephemeral not only accelerates database provisioning but also bakes in best practices for security and compliance. 

Seamless integration with Tonic Structural for realistic test data

One of the most powerful features of Tonic Ephemeral is its seamless integration with Tonic Structural, creating a dynamic duo that revolutionizes how developers work with test data in Oracle databases.

Screenshot of the Tonic Structural UI showing the Ephemeral integration

Tonic Structural is all about creating realistic, privacy-compliant test data that maintains the integrity and relationships of your production data. When combined with Ephemeral, this capability reaches new heights:

  1. Automatic PDB creation: When Ephemeral creates an Oracle database as an output from Structural, it automatically sets up a Pluggable Database (PDB) that matches the name of the source database in Structural. This ensures that your test environment closely mirrors your production setup, right down to the database structure.
  2. Data integrity preservation: The integration maintains all the relationships and structures defined in your original data. Foreign keys, constraints, and other complex data relationships are preserved, giving you a truly realistic testing environment.
  3. Privacy compliance: Structural's de-identification capabilities ensure that sensitive information is masked or synthesized. When this data flows into Ephemeral's Oracle instances, you get the best of both worlds: realistic data that's safe to use in non-production environments.
  4. Scalability and consistency: Whether you're working with a small dataset or terabytes of information, the Structural-Ephemeral integration scales effortlessly. Each developer can have their own isolated instance with a consistent, up-to-date dataset.
  5. Rapid refresh: Need to update your test data? The integration allows for quick refreshes. You can generate new data in Structural and spin up a fresh Oracle instance in Ephemeral in minutes, not hours or days.
  6. CI/CD ready: This integration shines in continuous integration and deployment pipelines. Automated tests can run against fresh, realistic data in isolated Oracle instances dramatically improving the reliability of your testing processes.
  7. Debug with confidence: When bugs appear, you can be confident they're due to your code, not data inconsistencies. The realistic test data helps uncover edge cases and scenarios that might be missed with mock data.

The Takeaway

The synergy between Tonic Structural and Ephemeral transforms the often cumbersome process of managing test data into a streamlined, automated workflow. Developers no longer need to wrestle with creating realistic test datasets or worry about accidentally using sensitive information. Instead, they get instant access to safe, production-like data in isolated Oracle environments.

This integration is more than just a convenience—it's a catalyst for better software development. By providing developers with realistic, readily available test data in properly configured Oracle databases, it enables more thorough testing, faster debugging, and ultimately, higher quality software releases. It's a testament to how Tonic's ecosystem of tools works together to solve complex challenges in modern software development.

As we wrap up our deep dive into Tonic Ephemeral's technical capabilities, we're now poised to explore its practical impact. In the final part of our series, we'll uncover the real-world benefits of implementing Ephemeral in your development workflow and share best practices for maximizing its potential. Get ready to discover how Ephemeral can transform your team's productivity and elevate your Oracle database management to new heights.

Already curious to chat through your Ephemeral needs? Connect with our team today.

Optimizing Oracle database management, part 2: CDB, PDB, & key features
Kirill Medvedev
Senior Software Engineer

Fake your world a better place

Enable your developers, unblock your data scientists, and respect data privacy as a human right.
Accelerate development with high-quality, privacy-respecting synthetic test data from Tonic.ai.Boost development speed and maintain data privacy with Tonic.ai's synthetic data solutions, ensuring secure and efficient test environments.