6 Sharded Database Schema Design
To obtain the benefits of sharding, the schema of a sharded database should be designed in a way that maximizes the number of database requests executed on a single shard.
- Sharded Database Schema Design Considerations
Design of the database schema has a big impact on the performance and scalability of a sharded database. An improperly designed schema can lead to unbalanced distribution of data and workload across shards and large percentage of multi-shard operations. - Creating Sharded Database Schema Objects
The following topics show you how to create the schema objects in your sharded database. Refer back to the Sharded Database Schema Objects section in chapter 2 for conceptual information about these objects. - DDL Execution in a Sharded Database
To create a schema in a sharded database, you must issue DDL commands on the shard catalog database, which validates the DDLs and executes them locally before they are executed on the shards. - PL/SQL Procedure Execution in a Sharded Database
In the same way that DDL statements can be run on all shards in a sharded database configuration, so too can certain Oracle-provided PL/SQL procedures. - Schema Creation Examples
The following examples show the steps you would take to create a schema for a sharded database using the system-managed, user-defined, and composite sharding methods. - DDL Execution Failure and Recovery Examples
The following examples demonstrate the steps to issue a DDL, monitor its execution status, and what to do when errors are encountered. - Generating Unique Sequence Numbers Across Shards
You can generate globally unique sequence numbers across shards for non-primary key columns, and it is handled by the sharded database.