Database Reference
In-Depth Information
a
C1 C2 C3 C4 C5 C6 C7 C8
C1 C2 C3 C4 C5 C6 C7 C8
...
rows
Page 1
Page n
b
C1
C2
C3
C4
C5
C6
C7
C8
...
pages
Fig. 13.2 Row-store ( a ) versus column-store ( b ) database systems
To save space, column-store database systems normally store columns in
pages in a compressed form. For example, consider the portion of the Sales
fact table, shown in Fig. 13.3 a. Figure 13.3 b-d shows a possible encoding
scheme for the columns EmployeeKey , CustomerKey ,and ProductKey , respec-
tively. Compression is based on run-length encoding, already discussed in
Chap. 7 . For example, Fig. 13.3 b shows a three-column table, with attributes
f , v ,and l ,where f indicates the first of l consecutive records with value v .For
instance, the first row in Fig. 13.3 b tells that in column EmployeeKey there
is a run of length five that starts in the first position and whose value is e1 .
Analogously, the next record tells that there are three e2 in positions 6-8.
Although ecient for the above scenarios, there are still many problems to
be solved by column-store database systems, for example, provide them with
capabilities to support updating in an ecient manner, a problem largely
solved by mature relational DBMSs (RDBMSs).
 
Search WWH ::




Custom Search