# US 8,543,621 B2 · Database partitioning by virtual partitions

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

- Number: US 8,543,621 B2
- Document ID: US8543621B2
- Status: Granted
- Kind: B2
- Application number: 13/588,636
- Filed: 2012-08-17
- Published: 2012-12-13
- Granted: 2013-09-24
- Earliest claimed: 2006-05-18
- Assignees: Google Inc.
- Applicants: David L. Butcher; Dan Moisa; Wendy Tobagus; Sunil Kosalge
- Inventors: David L. Butcher; Dan Moisa; Wendy Tobagus; Sunil Kosalge
- Web page: https://patentgrep.com/patent/US8543621B2

## CPC

- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A database may be virtually partitioned into virtual partitions. The virtual partitions are mapped to physical databases of a database. Data records added to the database are each assigned to a virtual partition and stored in the physical database mapped to the assigned virtual partition. The identifier generated for a data record includes an identifier of the assigned virtual partition. When additional databases are created, virtual partitions are remapped to the larger space of physical databases.

## Claims

### Claim 1

A method, comprising:
accessing a database that has been partitioned into a plurality of virtual partitions; wherein accessing the database includes mapping each of the virtual partitions to a respective one of a plurality of physical databases, the plurality of physical databases together forming the database;
inserting a plurality of data records into the database, including assigning each of the plurality of data records to a respective one of the plurality of virtual partitions;
storing each of the plurality of data records in the respective one of the plurality of physical databases to which the corresponding one of the virtual partitions is mapped;
generating a record identifier for at least one of the plurality of data records, wherein the record identifier comprises a virtual partition identifier corresponding to one of the plurality of virtual partitions in the database; and
in response to an increase in the number of the plurality of virtual partitions, increasing a number of bits used in the virtual partition identifier without increasing a length of the record identifier;
wherein instructions for generating the record identifier are implemented in at least one computer system that comprises instructions stored in a machine-readable medium and a processor that executes the instructions.

### Claim 2 (depends on 1)

The method of claim 1, wherein the step of increasing the number of bits used in the virtual partition identifier comprises using at least one bit from a plurality of buffer bits included in the record identifier.

### Claim 3 (depends on 1)

The method of claim 1, wherein the record identifier further comprises a sequential identifier that identifies the at least one of the plurality of data records within the virtual partition.

### Claim 4 (depends on 3)

The method of claim 3, further comprising the step of:
in response to an increase in the size of the virtual partition, increasing the number of bits used in the sequential identifier without increasing the length of the record identifier associated with the plurality of data records by adding at least one bit to the sequential identifier from a plurality of buffer bits included in the record identifier.

### Claim 5 (depends on 1)

The method of claim 1, wherein a first segment of the record identifier comprises the virtual partition identifier and a second segment of the record identifier comprises a sequential identifier for the data record.

### Claim 6 (depends on 5)

The method of claim 5, wherein one of the virtual partition identifier and the sequential identifier has a least significant bit at a leftmost end and one of the virtual partition identifier and the sequential identifier has a least significant bit at a rightmost end.

### Claim 7 (depends on 1)

The method of claim 1, wherein at least two of the virtual partitions are mapped to a same one of the physical databases.

### Claim 8

A system comprising:
a memory;
a processor; and
a computer program stored in the memory and configured to be executed by the processor, the computer program comprising:
instructions for accessing a database with a first number of virtual partitions, wherein accessing the database comprises mapping each of the first number of virtual partitions to one of a plurality of physical databases, the plurality of physical databases together forming the database;
instructions for inserting a plurality of data records into the database, including assigning each of the plurality of data records to a respective one of the plurality of virtual partitions;
instructions for storing each of the plurality of data records in the respective one of the plurality of physical databases to which the corresponding one of the virtual partitions is mapped;
instructions for generating a record identifier for at least one of the plurality of data records, wherein the record identifier comprises a virtual partition identifier corresponding to one of the plurality of virtual partitions in the database; and
instructions for, in response to an increase in the number of the plurality of virtual partitions, increasing a number of bits used in the virtual partition identifier without increasing a length of the record identifier.

### Claim 9 (depends on 8)

The system of claim 8, wherein the instructions for increasing the number of bits used in the virtual partition identifier comprise instructions for using at least one bit from a plurality of buffer bits included in the record identifier.

### Claim 10 (depends on 8)

The system of claim 8, wherein the record identifier further comprises a sequential identifier that identifies the data record within the virtual partition.

### Claim 11 (depends on 10)

The system of claim 10, further comprising:
instructions for, in response to an increase in the size of the virtual partition, increasing the number of bits used in the sequential identifier without increasing the length of the record identifier associated with the plurality of data records by adding at least one bit to the sequential identifier from a plurality of buffer bits included in the record identifier.

### Claim 12 (depends on 8)

The system of claim 8, wherein a first segment of the record identifier comprises the virtual partition identifier and a second segment of the record identifier comprises a sequential identifier for the data record.

### Claim 13 (depends on 12)

The system of claim 12, wherein one of the virtual partition identifier and the sequential identifier has a least significant bit at a leftmost end and one of the virtual partition identifier and the sequential identifier has a least significant bit at a rightmost end.

### Claim 14 (depends on 8)

The system of claim 8, wherein at least two of the virtual partitions are mapped to a same one of the physical databases.

### Claim 15

A non-transitory computer-readable medium for use in conjunction with a computer system, the non-transitory computer-readable medium comprising computer program instructions for execution by a processor, the computer program instructions comprising instructions for:
accessing a database with a first number of virtual partitions, wherein accessing the database comprises mapping each of the first number of virtual partitions to one of a plurality of physical databases, the plurality of physical databases together forming the database;
inserting a plurality of data records into the database, including assigning each of the plurality of data records to a respective one of the plurality of virtual partitions;
storing each of the plurality of data records in the respective one of the plurality of physical databases to which the corresponding one of the virtual partitions is mapped;
generating a record identifier for at least one of the plurality of data records, wherein the record identifier comprises a virtual partition identifier corresponding to one of the plurality of virtual partitions in the database; and
in response to an increase in the number of the plurality of virtual partitions, increasing a number of bits used in the virtual partition identifier without increasing a length of the record identifier.

### Claim 16 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein increasing the number of bits used in the virtual partition identifier comprises using at least one bit from a plurality of buffer bits included in the record identifier.

### Claim 17 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein the record identifier further comprises a sequential identifier that identifies the data record within the virtual partition.

### Claim 18 (depends on 17)

The non-transitory computer-readable medium of claim 17, further comprising instructions for:
in response to an increase in the size of the virtual partition, increasing the number of bits used in the sequential identifier without increasing the length of the record identifier associated with the plurality of data records by adding a bit to the sequential identifier from a plurality of buffer bits included in the record identifier.

### Claim 19 (depends on 15)

The non-transitory computer-readable medium of claim 15, wherein a first segment of the record identifier comprises the virtual partition identifier and a second segment of the record identifier comprises a sequential identifier for the data record.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein one of the virtual partition identifier and the sequential identifier has a least significant bit at a leftmost end and one of the virtual partition identifier and the sequential identifier has a least significant bit at a rightmost end.
