Intro to SQLfor Organizing
Module 2 · BigQuery Setup and Interface 2.2 Four building blocks
Subsection 2.2

Four building blocks

~5 min

Reading

Everything you touch in BigQuery fits into a hierarchy.

The four main building blocks are:

  1. Project.
  2. Dataset.
  3. Table.
  4. View.

A project is the top-level container in Google Cloud. It holds the Google Cloud resources, billing configuration, access settings, and services like BigQuery. For this course, you may use a single project provided for training, or a project you already have access to.

A dataset is like a folder or schema. It groups related tables and views. Permissions can be set at the dataset level, which makes it easier to control who can access related data.

A table is the actual rows and columns. It has a schema. It is where the data lives.

A view is a saved query that you can read from like a table. It does not always store a separate copy of the data. Instead, it can present a reusable query result.

Think of it this way:

Project
└── Dataset
    ├── Table
    └── View

Example:

bigquery-public-data.usa_names.usa_1910_current
  • bigquery-public-data is the project.
  • usa_names is the dataset.
  • usa_1910_current is the table.

In many SQL systems, you may hear the word "schema." In BigQuery, the dataset plays a similar organizing role. It holds related data objects and can share permissions across those objects.

For training environments, a "writebox" or scratch dataset may be provided. That type of dataset gives learners a place to practice queries, create temporary outputs, and experiment without affecting production data.

Learner action

In the Explorer panel, expand a project, then expand a dataset. Find at least one table and one view. Notice which icons help you tell them apart.

Everything in BigQuery lives inside four containers:

ObjectPlain-language definitionExample
ProjectTop-level container. Owns datasets, billing, and access.bigquery-public-data
DatasetA folder of related tables, living in a region.usa_names
TableThe actual rows and columns. Has a schema.usa_1910_current
ViewA saved query that you can read from like a table.top_names_by_state
Project · bigquery-public-data Dataset · usa_names Table · usa_1910 View · top_names Dataset · census_bureau_acs Table · county_2020_5yr
Diagram 2.2 · Nested objects. A project contains datasets. Datasets contain tables and views. You reference a table using its full path: project.dataset.table.

Try it in your tab

In the Explorer panel, expand the pinned project bigquery-public-data. Open a dataset like census_bureau_acs or usa_names. Click any table. The schema appears on the right.

The four building blocks of every query: SELECT (which columns), FROM (which table), WHERE (which rows), ORDER BY (in what order). Here's all four at once.

Action: Identify one project, one dataset, and one table in your console.