# US 2021/0081378 A1 · Integration of existing databases into a sharding environment

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0081378 A1
- Document ID: US20210081378A1
- Status: Published application
- Kind: A1
- Application number: 16/569,051
- Filed: 2019-09-12
- Published: 2021-03-18
- Earliest claimed: 2019-09-12
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Wei-Ming Hu; Ghazi Nourdine Benadjaoud; Mark Dilman; Darshan Maniyani; Sachin Rathod; Wumengjian Zhu
- Web page: https://patentgrep.com/patent/US20210081378A1

## CPC

- G06F 16/212: {with details for data modelling support}
- G06F 16/211: {Schema design and management}
- G06F 16/221: {Column-oriented storage; Management thereof}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2455: Query execution
- G06F 16/256: {in federated or virtual databases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques described herein create a sharding environment from existing independent databases, use the sharding environment to issue cross shard queries, create “on all shards” new objects, and create and “on all shards” new users that will have permission to access the data across all database shards.

## Claims

### Claim 1

A method, comprising:
a shard catalog server receiving schema data that defines a first sharded table schema that defines a first sharded table;
in response to receiving said first sharded table schema, said shard catalog server creating a respective table shard of said first sharded table on each database shard of a sharded database, wherein each database shard is hosted by a respective DBMS shard of a plurality of DBMS shards;
wherein each DBMS shard of said plurality of DBMS shards includes a respective federated table of a plurality of federated tables;
for each DBMS shard of said plurality of DBMS shards, said shard catalog server receiving respective local schema defining the respective federated table included in said each DBMS shard;
said shard catalog server generating a global schema defining said plurality of federated tables as a second sharded table;
said global schema defines a plurality of columns for said second sharded table.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
said shard catalog server receiving a particular query that references said second sharded table and one or more columns of said plurality of columns;
executing said particular query, wherein executing said particular query includes:
at least one of said plurality of DBMS shards executing a respective shard query against a respective federated table included in said at least one of said plurality of DBMS shards, said respective shard query referencing each of said one or more columns.

### Claim 3 (depends on 2)

The method of claim 2, wherein said global schema defines a shardspace name of each DBMS shard of said plurality of DBMS shards that identifies said each DBMS shard.

### Claim 4 (depends on 3)

The method of claim 3,
wherein said particular query includes a predicate referencing a particular shardspace name as pseudocolumn, said pseudocolumn not being materialized in any federated table of said plurality of federated tables, said particular shardspace name identifying a particular DMBS shard of said at least one of said plurality of DBMS shards;
wherein, in response to said particular query including said predicate, the particular DMBS shard executing the respective shard query.

### Claim 5 (depends on 2)

The method of claim 2, wherein said global schema defines a global datatype for each of said plurality of columns for said second sharded table.

### Claim 6 (depends on 5)

The method of claim 5,
wherein said respective shard query includes a predicate referencing one or more global datatypes defined in said global schema for said one or more columns;
wherein, in response to said respective query including said predicate, said at least one of said plurality of DBMS shards converting one or more source datatypes associated with said one or more columns to said one or more global datatypes.

### Claim 7 (depends on 2)

The method of claim 2, wherein generating said global schema comprises said shard catalog server tracking any columns of said plurality of columns that are heterogeneous.

### Claim 8 (depends on 2)

The method of claim 2, wherein generating said global schema comprises said shard catalog server tracking corresponding columns from said plurality of columns that are associated with different datatypes.

### Claim 9 (depends on 2)

The method of claim 2, wherein generating said global schema comprises said shard catalog server tracking any columns from said plurality of columns of said second sharded table that does not have a corresponding column in a particular federated table of said plurality of federated tables.

### Claim 10 (depends on 1)

The method of claim 1, further comprising said shard catalog server routing queries referencing one or more of said plurality of federated tables, to one or more of said plurality of DBMS shards without shard keys.

### Claim 11 (depends on 1)

The method of claim 1, further comprising:
said shard catalog server creating user accounts and associated privileges and granting said user accounts access to said plurality of federated tables according said privileges;
said shard catalog server granting itself as a user account, with access to each of said plurality of federated tables.

### Claim 12 (depends on 1)

The method of claim 1, wherein generating said global schema includes receiving integration rules for integration of received local schemas into the global schema.

### Claim 13 (depends on 1)

The method of claim 1, wherein said plurality of DBMS shards run on one or more different releases of the same DBMS system.

### Claim 14 (depends on 1)

The method of claim 1, wherein said plurality of DBMS shards run on one or more different DBMS systems from different vendors.

### Claim 15

One or more non-transitory computer-readable storage media storing one or more sequences of program instructions which, when executed by one or more computing devices, cause:
a shard catalog server receiving schema data that defines a first sharded table schema that defines a first sharded table;
in response to receiving said first sharded table schema, said shard catalog server creating a respective table shard of said first sharded table on each database shard of a sharded database, wherein each database shard is hosted by a respective DBMS shard of a plurality of DBMS shards;
wherein each DBMS shard of said plurality of DBMS shards includes a respective federated table of a plurality of federated tables;
for each DBMS shard of said plurality of DBMS shards, said shard catalog server receiving respective local schema defining the respective federated table included in said each DBMS shard;
said shard catalog server generating a global schema defining said plurality of federated tables as a second sharded table;
said global schema defines a plurality of columns for said second sharded table.

### Claim 16 (depends on 15)

The one or more non-transitory computer-readable storage media of claim 15, wherein the one or more sequences of the program instructions which, when executed by the one or more computing devices, further cause:
said shard catalog server receiving a particular query that references said second sharded table and one or more columns of said plurality of columns;
executing said particular query, wherein executing said particular query includes:
at least one of said plurality of DBMS shards executing a respective shard query against a respective federated table included in said at least one of said plurality of DBMS shards, said respective shard query referencing each of said one or more columns.

### Claim 17 (depends on 16)

The one or more non-transitory computer-readable storage media of claim 16, wherein said global schema defines a shardspace name of each DBMS shard of said plurality of DBMS shards that identifies said each DBMS shard.

### Claim 18 (depends on 17)

The one or more non-transitory computer-readable storage media of claim 17,
wherein said particular query includes a predicate referencing a particular shardspace name as pseudocolumn, said pseudocolumn not being materialized in any federated table of said plurality of federated tables, said particular shardspace name identifying a particular DMBS shard of said at least one of said plurality of DBMS shards;
wherein, in response to said particular query including said predicate, the particular DMBS shard executing the respective shard query.

### Claim 19 (depends on 16)

The one or more non-transitory computer-readable storage media of claim 16, wherein said global schema defines a global datatype for each of said plurality of columns for said second sharded table.

### Claim 20 (depends on 19)

The one or more non-transitory computer-readable storage media of claim 19,
wherein said respective shard query includes a predicate referencing one or more global datatypes defined in said global schema for said one or more columns;
wherein, in response to said respective query including said predicate, said at least one of said plurality of DBMS shards converting one or more source datatypes associated with said one or more columns to said one or more global datatypes.

### Claim 21 (depends on 16)

The one or more non-transitory computer-readable storage media of claim 16, wherein generating said global schema comprises said shard catalog server tracking any columns of said plurality of columns that are heterogeneous.

### Claim 22 (depends on 16)

The one or more non-transitory computer-readable storage media of claim 16, wherein generating said global schema comprises said shard catalog server tracking corresponding column from said plurality of columns that are associated with different datatypes.

### Claim 23 (depends on 16)

The one or more non-transitory computer-readable storage media of claim 16, wherein generating said global schema comprises said shard catalog server tracking any columns from said plurality of columns of said second sharded table that does not have a corresponding column in a particular federated table of said plurality of federated tables.

### Claim 24 (depends on 15)

The one or more non-transitory computer-readable storage media of claim 15, wherein the one or more sequences of the program instructions which, when executed by the one or more computing devices, further cause said shard catalog server routing queries referencing one or more of said plurality of federated tables, to one or more of said plurality of DBMS shards without shard keys.

### Claim 25 (depends on 15)

The one or more non-transitory computer-readable storage media of claim 15, wherein the one or more sequences of the program instructions which, when executed by the one or more computing devices, further cause:
said shard catalog server creating user accounts and associated privileges and granting said user accounts access to said plurality of federated tables according said privileges;
said shard catalog server granting itself as a user account, with access to each of said plurality of federated tables.

### Claim 26 (depends on 15)

The one or more non-transitory computer-readable storage media of claim 15, wherein generating said global schema includes receiving integration rules for integration of received local schemas into the global schema.

### Claim 27 (depends on 15)

The one or more non-transitory computer-readable storage media of claim 15, wherein said plurality of DBMS shards run on one or more different releases of the same DBMS system.

### Claim 28 (depends on 15)

The one or more non-transitory computer-readable storage media of claim 15, wherein said plurality of DBMS shards run on one or more different DBMS systems.
