Skip to Main Content

Oracle Database 23ai - Oracle Globally Distributed Database

Oracle Globally Distributed Database disperses segments of a data set across many databases (shards) onto different computers - on-premises or in the cloud. It enables globally distributed, linearly scalable, multimodel databases. It requires no specialized hardware or software. Oracle Globally Distributed Database does all this while rendering the strong consistency, full power of SQL, support for structured and unstructured data, and the Oracle Database ecosystem. It meets data sovereignty requirements and supports applications that require low latency and high availability.

Oracle's Globally Distributed Autonomous Database is a fully managed OCI service, simplifying the deployment and management of distributed databases. Organizations can control data distribution policies, enabling them to specify where in OCI data is stored and processed.

  • Understanding distributed databases and their use cases
  • Oracle Distributed Database data distribution methods
  • Oracle Distributed Database replication methods
  • Oracle Distributed Database deployment architectures
  • Oracle Globally Distributed Autonomous Database details
  • 23ai New Features related to distributed databases

General knowledge of Oracle databases (between 11g and 19c).

Resources

Question And Answer

  • #SELECTION#
    #ICON_HTML#

    Can we configure Oracle Enterprise Manager (OEM) as a distributed database so that we can monitor all databases across different geographical regions through a centralized OEM ?

    Oracle Enterprise Manager Cloud Control lets you discover, monitor, and manage an Oracle
    Globally Distributed Database and its components.

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    For inserting NEW data, for several customers, will the application connect to the global coordinator database and let it "direct" each set of data (for each customer) automatically to the proper shard/chunk ? (aka to perform a similar operation to what the demo java program has done)

    If you are inserting new data from an application, you should work with one transaction for one customer at a time assuming your data is sharded by customer.

    To load a lot of customers/orders/lineitems at a time, you might also use Data Pump.

    Data Pump import can be run in parallel on all shards from the same dump file and each shard will ignore rows that do not belong to itself. 

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    It is advised to have catalog and director HA? Or can it easily recreated later on a running shard env? Will everything still run if catalog/director is down?

    It is certainly good practice to ensure high availability of shard catalog and shard directors.

    One should associate a standby database to the shard catalog database for high availability or disaster recovery purposes.

    You need at least a shard director per region, but can deploy up to five shard directors in a given region to achieve high availability and scalability.

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    May you position sharding versus partitioning?

    Because Oracle Globally Distributed Database is based on table partitioning, all of the
    subpartitioning methods provided by Oracle Database are also supported for sharding.

    For instance, one might use system-managed partitioning for sharding by cust-id and sub-partition by date inside a shard:

    (...)

    PARTITION BY CONSISTENT HASH (cust_id)
    SUBPARTITION BY RANGE (signup_date)

    (...)

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    Question about Multi shards transaction: --------------------------------------------- For example We have 2 accounts in the account_table that is sharded by account_ID. Account A is in Shard1 , and account B is in Shard2. An application issue an atomic transaction to credit Account A and debit Account B as following: Transaction ( update balance_table set account=account+x where account_ID=A; update balance_table set account=account-x where account_ID=B; Commit; ) How will Oracle Distributed DB handle this transaction? and how will it scale in throughput? Is there any performance penalties for such transactions that is updating multi shards ?

    Sharding is a good architecture to provide high scalabiliy on a shared nothing architecture...only if your schema and application are compatible with processing a transaction locally once you have been routed to a shard according to your sharding key.

    To process a DML transaction across data in multiple shards (as in your example), you would need to connect  using the GDS$CATALOG built-in service and use the shard catalog query coordinator as a proxy. This will work but will be slow and will ruin the scalability if you do it too often. It must be an exceptional transaction in your application.

    A regular transaction to a sharded database service using a sharding key should connect you to just a single shard and will allow you to only modify data in that shard.

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    Replicate between shards: does that mean that specific data is on every shard, because this means that data for e.g. India is also present in another country?

    In a global architecture for data sovereignty, one might first split data by region ("sharspace"), with one shardspace only for India. In that Indian shardspace, one could have a shardgroup of 10 shards with RAFT replication inside this shardgroup. Indian data will then be replicated in India only. Other geographies will have their own shardgroups with their own RAFT replication.

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    So if we use RAFT replication, each shard database will need to be a full size copy?

    Not if you use more than three shards. For instance if you have ten shards, each Raft Replication Unit will only be stored/replicated on three of the ten shards. And updates will normally be directed to the leading shard for the RU. It is a bit similar to a stripe and mirror architecture like ASM.

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    What changes need to be made to an existing Java application to enable it to use a sharding database?

    Fisrt of all you need to have a schema that it compatible with sharding: a hierarchical family of tables under your sharding key.

    In Java, you will certainly have to modify the connection pool and the way you get and close a connection from that pool. 

    Using Oracle's Universal Connection Pool is the best practice.

    #MISC#
    #ACTIONS#
  • #SELECTION#
    #ICON_HTML#

    we have a RAC that replicates to 3 diffrent countries using shareplex, can we migrate to shards?

    It is hard to answer to this question without more information about your architecture. Here are a few things to consider:

    1. Sharding can use RAC for shards.
    2. RAC is good for any application (as the name "Real Application Clusters" highlights), but Sharding is only possible if your schema and application are compatible with its constraints. You need to be able to "shard by something" and complete most transactions on the target shard for a given sharding key.
    3. If 95% of your transactions happen for a known country and are using country specific data and you have a country-code in your tables, yes your might be able to migrate your apllication to a sharded architecture with or without RAC for shards.
    #MISC#
    #ACTIONS#

Featured Speakers

  • Speaker

    FRANCOIS PONS


    Senior Principal Product Manager

Workshop Info

Session Has Completed - 05 June 2024
1 Hour
English
Analyst, Architect, Database Administrator, Developer
Database 23ai, Globally Distributed Autonomous Database

Presentations