professional-cloud-data-engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A data architect is migrating an enterprise e-commerce reporting workload from a normalized relational database to BigQuery. The existing relational model contains a parent Orders table and a child Order_Items table related by an order_id foreign key (a 1-to-many relationship).
The analytical workload frequently aggregates line items per order, but queries that join these multi-billion-row tables across compute slots suffer from significant data shuffling and high slot consumption. The architect has the following requirements:
JOIN operations.How should the architect model this schema in BigQuery?
In BigQuery, combining the ARRAY (repeated mode) and STRUCT (RECORD type) data types allows you to store multiple structured child objects directly inside a single parent row. This pattern creates a semi-normalized or nested schema that natively represents one-to-many parent-child relationships.
STRUCT into its own storage column. Queries referencing only order headers (e.g., order_date, customer_id) bypass the nested line item columns completely, minimizing bytes scanned and reducing query costs.LEFT JOIN UNNEST() or comma cross joins.This approach eliminates the performance bottlenecks of normalized relational joins in distributed MPP environments while preventing the storage bloat and duplicate aggregation errors associated with flat denormalization.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.