Generating files having column-oriented layouts
A computer-implemented method is provided herein of generating a file having a column-oriented layout and having a file header and a data block. The method includes a step of inserting length information of an encryption vector into the data block; a step of inserting the encryption vector into the data block; and a step of inserting data array of the encrypted column after referring to the encryption vector.
1. A computer-implemented method of generating a file having a column-oriented layout, a file header, and a data block, the method comprising:
inserting, by a processor, length information of an encryption vector into the data block;
inserting, by a processor, the encryption vector into the data block; and
inserting, by a processor, a data array of an encrypted column into the data block after referring to the encryption vector.
2. The computer-implemented method of claim 1 , wherein the data array to be inserted consists of encryption data of a compressed data array.
3. The computer-implemented method of claim 2 , wherein the encryption vector is a vector that has 0 or 1 in a bit corresponding to an order of column to be encrypted and has 1 or 0 in the bit corresponding to the order of column which is not encrypted.
4. The computer-implemented method of claim 2 , further comprising a step of inserting an initial vector into the data block; and inserting authentication code into the data block.
5. The computer-implemented method of claim 4 , wherein the authentication code is a hashing value of data block area.
6. A method for querying the file having column-oriented layout generated by the method of claim 2 , comprising:
receiving information of a column to be queried;
decrypting the column if the column is an encrypted column by referring to the encryption vector; and
querying the data array of the decrypted column.
7. The computer-implemented method of claim 1 , wherein the encryption vector is a vector that has 0 or 1 in a bit corresponding to an order of a column to be encrypted and has 1 or 0 in the bit corresponding to the order of the column that is not encrypted.
8. The computer-implemented method of claim 1 , further comprising a step of inserting an initial vector into the data block; and inserting an authentication code into the data block.
9. The computer-implemented method of claim 8 , wherein the authentication code is a hashing value of data block area.
10. A method for querying the file having column-oriented layout generated by the method of claim 1 , comprising:
receiving information regarding a column to be queried;
decrypting the column if the column is an encrypted column by referring to the encryption vector; and
querying the data array of the decrypted column.