US 9,811,548 B2
Method and apparatus for database
Alexander Stigsen, Akkerid (DK); Bjarne Christiansen, Hvidovre (DK); and Lasse Reinhold, Hvidovre (DK)
Assigned to TightDB, Inc., San Francisco, CA (US)
Appl. No. 14/398,109
Filed by TightDB Inc, Palo Alto, CA (US)
PCT Filed Mar. 1, 2013, PCT No. PCT/US2013/028738
§ 371(c)(1), (2) Date Oct. 30, 2014,
PCT Pub. No. WO2013/165546, PCT Pub. Date Jul. 11, 2013.
Claims priority of provisional application 61/640,053, filed on Apr. 30, 2012.
Prior Publication US 2015/0088844 A1, Mar. 26, 2015
Int. Cl. G06F 7/00 (2006.01); G06F 17/30 (2006.01); G06F 9/44 (2006.01)
CPC G06F 17/30371 (2013.01) [G06F 17/30312 (2013.01); G06F 17/30315 (2013.01); G06F 17/30327 (2013.01); G06F 8/30 (2013.01)] 17 Claims
OG exemplary drawing
 
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.