Anisotropic compression as applied to columnar storage formats
Herein are spatially scalable techniques for anisotropic compression of shared entropy between alternate representations of same data. In an embodiment, a computer compresses an uncompressed independent column into a compressed independent column. Based on the compressed independent column, an uncompressed dependent column is compressed into a compressed dependent column. The compressed independent column and the compressed dependent column are stored in a same file. In an embodiment, a computer stores, in metadata, an encrypted private key for decrypting an encrypted column. The encrypted column and the metadata are stored in a file. A request to read the encrypted column is received. Based on a public key and the file, the encrypted private key is decrypted into a decrypted private key. The public key is contained in the request and/or the file. The request is executed by decrypting, based on the decrypted private key and the file, the encrypted column.
1 . A method comprising:
storing, by a database server, in a single file as a plurality of pages, both of: an encrypted column and an encrypted private decryption key for decrypting the encrypted column;
modifying, after said storing, said single file without modifying said encrypted column;
receiving a request to read the encrypted column;
decrypting, based on a public key and said single file, the encrypted private decryption key into a decrypted private key, wherein the public key is contained in at least one selected from a group consisting of the request and the single file; and
executing the request by decrypting, based on the decrypted private key and said single file, the encrypted column.
2 . The method of claim 1 further comprising generating, based on the public key, the encrypted column from an unencrypted column.
3 . The method of claim 1 wherein:
the method is performed by a database management system (DBMS);
the method further comprises the DBMS associating the public key with a role in the DBMS.
4 . The method of claim 1 wherein said request does not contain the public key.
5 . The method of claim 1 wherein said modifying said single file comprises adding or removing a column in the single file that is not said encrypted column.
6 . The method of claim 5 wherein said adding or removing comprises adding or removing, in the single file, at least one selected from a group consisting of a user of a DBMS and a role in the DBMS.
7 . The method of claim 1 wherein:
the single file contains a plurality of encrypted columns that includes said encrypted column;
each column in the plurality of encrypted columns corresponds to a respective distinct key in a plurality of encrypted keys.
8 . The method of claim 1 further comprising after said storing, modifying a keystore in said single file without modifying said encrypted column.
9 . The method of claim 1 further comprising decrypting, based on said public key, a second plurality of encrypted keys that is a subset of a first plurality of encrypted keys.
10 . The method of claim 9 further comprising decrypting, based on a second public key, a third plurality of encrypted keys that is a subset of said first plurality of encrypted keys.
11 . The method of claim 10 wherein:
the third plurality of encrypted keys contains at least one key of the second plurality of encrypted keys, or
the third plurality of encrypted keys does not contain at least one key of the second plurality of encrypted keys.
12 . A method comprising:
storing, in metadata, an encrypted private key for decrypting an encrypted column;
storing a file as a plurality of pages that consists of a first plurality of pages and a second plurality of pages, wherein said metadata identifies said second plurality of pages;
storing in the file:
the encrypted column and said metadata,
one or more independent columns in the first plurality of pages,
one or more dependent columns that includes said encrypted column in the second plurality of pages, and
second metadata that identifies said first plurality of pages but not the second plurality of pages;
modifying, after said storing the encrypted column and said metadata in the file, said file without modifying said encrypted column;
receiving a request to read the encrypted column;
decrypting, based on a public key and said file, the encrypted private key into a decrypted private key, wherein the public key is contained in at least one selected from a group consisting of the request and the file; and
executing the request by decrypting, based on the decrypted private key and said file, the encrypted column.
13 . The method of claim 12 wherein said second metadata is located between said metadata in said file and the end of said file.
14 . One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
storing, by a database server, in a single file as a plurality of pages, both of: an encrypted column and an encrypted private decryption key for decrypting the encrypted column;
modifying, after said storing, said single file without modifying said encrypted column;
receiving a request to read the encrypted column;
decrypting, based on a public key and said single file, the encrypted private decryption key into a decrypted private key, wherein the public key is contained in at least one selected from a group consisting of the request and the single file; and
executing the request by decrypting, based on the decrypted private key and said single file, the encrypted column.
15 . The one or more non-transitory computer-readable media of claim 14 wherein said request does not contain the public key.
16 . The one or more non-transitory computer-readable media of claim 14 wherein said modifying said single file comprises adding or removing a column in the single file that is not said encrypted column.
17 . The one or more non-transitory computer-readable media of claim 16 wherein said adding or removing comprises adding or removing, in the single file, at least one selected from a group consisting of a user of a DBMS and a role in the DBMS.
18 . The one or more non-transitory computer-readable media of claim 16 wherein:
the one or more processors are in a database management system (DBMS);
the instructions further cause the DBMS associating the public key with a role in the DBMS.
19 . The one or more non-transitory computer-readable media of claim 14 wherein the instructions further cause decrypting, based on said public key, a second plurality of encrypted keys that is a subset of a first plurality of encrypted keys.
20 . One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
storing, in metadata, an encrypted private key for decrypting an encrypted column;
storing a file as a plurality of pages that consists of a first plurality of pages and a second plurality of pages, wherein said metadata identifies said second plurality of pages;
storing in the file:
the encrypted column and said metadata,
one or more independent columns in the first plurality of pages,
one or more dependent columns that includes said encrypted column in the second plurality of pages, and
second metadata that identifies said first plurality of pages but not the second plurality of pages;
modifying, after said storing the encrypted column and said metadata in the file, said file without modifying said encrypted column;
receiving a request to read the encrypted column;
decrypting, based on a public key and said file, the encrypted private key into a decrypted private key, wherein the public key is contained in at least one selected from a group consisting of the request and the file; and
executing the request by decrypting, based on the decrypted private key and said file, the encrypted column.
21 . The one or more non-transitory computer-readable media of claim 20 wherein said second metadata is located between said metadata in said file and the end of said file.