Migrate a library app to BigQuery: authors are currently in a separate relational table joined by key. Per BigQuery schema best practices, how should you model data for fastest queries of a borrowed book's author?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a table containing books and authors, nesting author fields inside an author column..
Why this is the answer
Nesting author fields within a RECORD (struct) type inside the books table is the BigQuery best practice for this scenario. BigQuery performs best with denormalized data, and nesting allows you to keep related data together in a single table without the performance overhead of joins. This eliminates the need for joins when querying author information for a specific book, leading to faster query execution. Keeping separate tables and joining them (either directly or via a view) is less performant in BigQuery due to its columnar storage and distributed query engine. Creating a wide table with individual columns for each author attribute is also a form of denormalization but is less organized and harder to manage than using nested RECORD types, especially if author attributes expand.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed