Database partitioning by virtual partitions
AssigneeGoogle Inc.
InventorsDavid L. Butcher, Dan Moisa, Wendy Tobagus, Sunil Kosalge
Life of this patent
Estimating the term…
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.
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.