Data Model of Bigtable
Learn about the data model of Bigtable.
We'll cover the following...
A data model and an associated API are the cornerstones of any database. In this lesson, we will learn how Bigtable uses key-value stores to provide an abstraction of a table and associated table and data manipulation operations.
Bigtable is a
- Row key: It uniquely determines the row.
- Column family: This depicts a group of columns.
- Column name: It uniquely determines the column.
- Timestamp: The columns can have different versions of a value uniquely determined by timestamps.
A row key, column key, and timestamp are used to index the map. All map’s values are uninterpreted arrays of bytes. Bigtable treats all data as raw byte strings.
(row: string, column: string, time: int64) → string
Google designed Bigtable to store large amounts of data efficiently. For instance, if we are storing the web page, then the row key will be a URL e.g., educative.io. The column key says that we’re going to store the contents of the webpage at that URL. The timestamp is just possibly the time at which we crawled the web and fetched that webpage. The value is the content of the web page. Now, this is a three-dimensional table. If we’ve crawled the web at previous times, we’ll just leave the older versions in the table.
Rows
All rows in Bigtable have an associated row key, an arbitrary string up to 64 KB in size (most of the keys are much smaller than 64 KB). Each write and read of the data in a distinct row key is