Databases and environments
This topic describes the relationship between database container objects and environments in the Delphix Engine object model.
The core Delphix objects revolve around the notion of environments and databases, known at the API layer as containers. Understanding how these objects relate to each other is crucial to operating effectively within the CLI. This section provides an overview of these objects; for more information about a particular representation such as Oracle RAC, see the Web Service API Guide.
In variations of a use case where a database propagates down to lower environment databases (for keeping consistent data), records created in the lower tables would likely be overwritten by the propagating database once they are synced. Delphix is keeping track of changes at the data block level on disk, which would render this result.
As a solution, you could create a clone of the propagating database and then programmatically compare/merge the changes. You can also use a product like Oracle Goldengate, HVR, IBM Datastage, etc, to capture (extract) and propagate (replicate to lower) changes.
Environment components
An environment is the root representation of the external state that manages database instances. An environment could be a single host (
UnixHostEnvironment
) or an Oracle cluster (OracleClusterEnvironment
). Environments exist to contain repositories, and each environment may have any number of repositories associated with it.A repository is an entity that contains database instances. Repositories are typically installation directories (
OracleInstall
) within an environment. Within each repository is any number ofSourceConfig
objects, which represent known database instances.The source config exists independent of Delphix, and could represent a possible dSource (in which case there is no associated database object), or could be managed entirely by Delphix (for VDBs). The source config contains intrinsic properties of the database instance, while the source (described below) contains information specific to Delphix and only exists when the source config is linked to a dSource or VDB.
Most environment objects are created through the act of discovery. By specifying a host, Delphix will attempt to automatically discover all environments, repositories, and source configs. These objects can also be added manually after the fact in cases where discovery fails.
The environment hierarchy can be represented as depicted below. The generic type is listed in the top portion of each box, with an example of the Oracle single instance objects in the lower portion of each box. Each of these objects can contain multiple child objects with it.
![](../../__attachments/31443906/CLI-fig-Environments.png?inst-v=9f5cd9ef-94fe-4677-b3c4-6c5d1617af5c)
Database components
The core of all databases within Delphix is the container that holds all the physical data associated with the database, whether a dSource or VDB. Within each container is a Timeflow, which represents a single timeline of change within the database history. Currently, a container can only have one Timeflow, though this limitation may be relaxed in a future release.
Within a Timeflow are two important objects: TimeflowSnapshot
objects and TimeflowRange
objects. Timeflow range represents the provisionable ranges within the history of the Timeflow, while Timeflow snapshot represents a point at which a snapshot was taken and therefore is more likely to provision in a short amount of time.
The environment hierarchy can be represented as depicted below. Each container may be associated with a source, which is the Delphix representation of an external database when it is associated with a container, and contains information specific to managing that source. Not all source configs within an environment have a source associated with them (as is the case with linkable databases), but all sources must have a source config. Containers may have no sources associated with them if they are unlined; sources can be manually attached at a later point. Currently, each container can have at most once source associated with it, though this may change in a future release.
![](../../__attachments/31443906/CLI-fig-Databases.png?inst-v=9f5cd9ef-94fe-4677-b3c4-6c5d1617af5c)