Tables and views
In Bigtable, you store your data in tables, and you can create severaltypes of views of your tables. The type of view that you use depends on youruse case.
Tables
A Bigtabletable is a sorted key-value map that stores data in rowsand columns. Each row is indexed by a single, uniquerow key. Columns that arerelated to one another are typically grouped into acolumn family.
Bigtable has a flexible data model, and its tables aresparse.This means that if a column is unused in a row, no data is stored for thecolumn. You don't need to store NULL values for unused columns like you wouldwith a relational database. In a Bigtable table, a given row mighthave one column and the row next to it 100 columns.
In a row, a column can contain multiple cells, each identified by thefour-tuple (row key, column family, column qualifier, timestamp). Storingmultiple cells in a column provides a record of how the stored data for that rowand column has changed over time.
A Bigtable table doesn't support joins, and transactions aresupported only within a single row.
A table is an instance-level resource that is automatically replicated to everycluster in the instance. Data retention is controlled withgarbage collectionpolicies that are set at the column-family level.
For more information, see theBigtable overview andSchema design best practices.
Views
Bigtable supports the following types of table views: logical views,continuous materialized views, and authorized views. Views let you share table data withparticular users and groups without giving them access to the underlying sourcedata.
Logical views
Alogical view – often referred to as just aview – is the result of a SQLquery. It functions as a virtual table that can be queried by other SQL queries.For more information, seeCreate and manage logical views.
Continuous materialized views
Preview
This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.
Acontinuous materialized view is created by continuously running a SQL query against aBigtable table. Bigtable creates a new table basedon the query output and keeps it in sync with the source table.
Continuous materialized views can help improve query performance. The new table – thecontinuous materialized view – has a different schema than the source table, containingpre-aggregated or transformed data that is optimized for different queries thanthose used on the source table.
Continuous materialized views are read-only. You are charged for storage of a continuous materializedview as well as for the processing work that goes into creating the secondtable, keeping it in sync with the source table, and replicating it.
For more information, seeContinuous materializedviews.
Authorized views
Authorized views are views of tables that you configure to includespecific table data and then grant access to separately from access to thesource table. An authorized view is defined by a JSON-formatted definitionfile.
Unlike continuous materialized views or logical views, Bigtable authorized viewscan be used to control both read and write access.
Authorized views are useful in cases where you store data for multiplecustomers in a Bigtable table, and you want to grant each customeraccess only to a subset of the table that contains their data.
Authorized views don't incur additional storage costs.
For more information, see theOverview of authorized views.
Comparisons
The following table provides additional information about howBigtable table views differ from each other.
| Logical views | Continuous materialized views | Authorized views | |
|---|---|---|---|
| Structure | Virtual table representing the results of a SQL query | Read-only table based on a source table | Subset of a table |
| Definition | SQL query | SQL query | JSON definition file |
| Consistency with source table | Consistent when the query is run | Eventually consistent | Consistent when the query is run |
| Query options | Must use SQL | SQL or Bigtable Data API | Bigtable Data API |
| Writeable | No | No | Yes |
| Storage | Data remains in the source table | Data is duplicated, aggregated, or transformed and stored in a newread-only table | Data remains in the source table |
| Usage costs | Compute processing to execute the query | Compute processing when syncing, storage costs | Compute processing to execute the query |
What's next
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-15 UTC.