Method and apparatus for database
First Claim
1. A method for representing a database in a computer readable medium, the method comprising:
- accessing a first table in the database, the first table having a plurality of rows of data, each row of data having one or more columns;
storing a first representation of the first table in a volatile computer memory in a column-oriented format, the column-oriented format comprising at least one B-tree for at least one column,wherein the at least one B-tree is composed of at least one array and the at least one B-tree includes references to a plurality of arrays, each array of the plurality of arrays is comprised of data corresponding to rows of one column of the first table,wherein the storing further comprises reducing an amount of storage space required when storing the first representation of the first table to improve storage efficiency by storing data of a particular column corresponding to the rows in a packed format using a power of two amount of space to store each datum and adaptively increasing the power of two amount of space to store each datum in the particular column when a datum is to be written to the particular column that has a value that requires an increased amount of space for storage to reduce use of unnecessary storage space; and
storing a second representation of the first table on a computer-readable medium, wherein the second representation is substantially identical to the first representation, without serialization of the first representation of the first table to an intermediate form, without deserialization from the intermediate form into the second representation, and without basic header information, metadata or other versioning information necessarily being identical.
3 Assignments
0 Petitions
Accused Products
Abstract
A method for representing a database in a computer readable medium. Accessing a first table in the database. The first table has rows of data, each row of data having one or more columns. Storing a first representation of the first table in a volatile computer memory in a column-oriented format, the column-oriented format comprising at least one B-tree for at least one column, wherein the B-tree is composed of at least one array and the at least one B-tree includes references to a plurality of arrays, each array of the plurality of arrays comprised of data corresponding to the rows of one column of the table, wherein the storing further comprising storing data corresponding to the rows in a packed format. Storing a second representation of the database on the computer-readable medium, the second representation substantially identical to the first representation.
-
Citations
17 Claims
-
1. A method for representing a database in a computer readable medium, the method comprising:
-
accessing a first table in the database, the first table having a plurality of rows of data, each row of data having one or more columns; storing a first representation of the first table in a volatile computer memory in a column-oriented format, the column-oriented format comprising at least one B-tree for at least one column, wherein the at least one B-tree is composed of at least one array and the at least one B-tree includes references to a plurality of arrays, each array of the plurality of arrays is comprised of data corresponding to rows of one column of the first table, wherein the storing further comprises reducing an amount of storage space required when storing the first representation of the first table to improve storage efficiency by storing data of a particular column corresponding to the rows in a packed format using a power of two amount of space to store each datum and adaptively increasing the power of two amount of space to store each datum in the particular column when a datum is to be written to the particular column that has a value that requires an increased amount of space for storage to reduce use of unnecessary storage space; and storing a second representation of the first table on a computer-readable medium, wherein the second representation is substantially identical to the first representation, without serialization of the first representation of the first table to an intermediate form, without deserialization from the intermediate form into the second representation, and without basic header information, metadata or other versioning information necessarily being identical. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method of extending a definition of a first variable used in a first computer program, wherein the first computer program is encoded in a programming language, and the first computer program is stored in a computer-readable medium, the method comprising during execution of the first computer program on a computer system:
-
determining from the definition of the first variable a schema, wherein the schema describes a plurality of columns of a first table of a database; defining a first representation of the first table in a computer-readable memory coupled to a first computer, the first representation comprising a column-oriented format further comprising at least one B-tree for at least one column, wherein the at least one B-tree is composed of at least one array and the at least one B-tree includes references to a plurality of arrays, each array of the plurality of arrays is comprised of data corresponding to rows of one column of the first table, wherein the defining further comprises reducing an amount of storage space required when storing data of a particular column to improve storage efficiency by storing data of the particular column corresponding to the rows in a packed format using a power of two amount of space to store each datum and adaptively increasing the power of two amount of space to store each datum in the particular column when a datum is to be written to the particular column that has a value that requires an increased amount of space for storage to reduce use of unnecessary storage space, wherein the first representation supports a database transaction on the first table indicated by the first computer program, and wherein the first representation provides database atomicity, consistency, isolation and durability guarantees on completion of the database transaction. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. A non-transitory computer-readable storage medium storing instructions for representing a database in a volatile computer memory, the instructions which when executed by a processor cause the processor to:
-
access a first table in the database, the first table having a plurality of rows of data, each row of data having one or more columns; store a first representation of the first table in the volatile computer memory in a column-oriented format, the column-oriented format comprising at least one B-tree for at least one column, wherein the at least one B-tree is composed of at least one array and the at least one B-tree includes references to a plurality of arrays, each array of the plurality of arrays is comprised of data corresponding to rows of one column of the first table, wherein the storing further comprises reducing an amount of storage space required when storing the first representation of the first table to improve storage efficiency by storing data of a particular column corresponding to the rows in a packed format using a power of two amount of space to store each datum and adaptively increasing the power of two amount of space to store each datum in the particular column when a datum is to be written to the particular column that has a value that requires an increased amount of space for storage to reduce use of unnecessary storage space; and store a second representation of the first table on a computer-readable medium, wherein the second representation is substantially identical to the first representation, without serialization of the first representation of the first table to an intermediate form and without deserialization from the intermediate form into the second representation, without basic header information, metadata or other versioning information necessarily being identical.
-
-
17. A system for representing a database in a volatile computer memory, the system comprising:
-
a processor coupled to the volatile computer memory and a non-transitory computer-readable storage medium; the non-transitory computer-readable storage medium storing instructions which when executed by a processor cause the processor to; access a first table in the database, the first table having a plurality of rows of data, each row of data having one or more columns; store a first representation of the first table in the volatile computer memory in a column-oriented format, the column-oriented format comprising at least one B-tree for at least one column, wherein the at least one B-tree is composed of at least one array and the at least one B-tree includes references to a plurality of arrays, each array of the plurality of arrays is comprised of data corresponding to rows of one column of the first table, wherein the storing further comprises reducing an amount of storage space required when storing the first representation of the first table to improve storage efficiency by storing data of a particular column corresponding to the rows in a packed format using a power of two amount of space to store each datum and adaptively increasing the power of two amount of space to store each datum in the particular column when a datum is to be written to the particular column that has a value which requires an increased amount of space for storage to reduce use of unnecessary storage space; and store a second representation of the first table on a computer-readable medium, wherein the second representation is substantially identical to the first representation, without serialization of the first representation of the first table to an intermediate form, without deserialization from the intermediate form into the second representation, and without basic header information, metadata or other versioning information necessarily being identical.
-
Specification