Question 496 of 503

Quick Answer

The answer is that materialized views cannot include non-deterministic functions because the stored result set would become logically inconsistent the moment it is written. A materialized view physically persists query results like a table, so if the defining query uses functions such as NOW(), RAND(), or CURRENT_TIMESTAMP—whose output changes with every evaluation—the cached data would immediately be stale, defeating the purpose of precomputation. On the Google Professional Cloud Database Engineer exam, this limitation often appears in scenario-based questions where a candidate suggests a materialized view to optimize a slow, costly BI dashboard query that uses window functions or joins; the trap is overlooking that non-deterministic functions are explicitly forbidden in most SQL databases like PostgreSQL, Oracle, and BigQuery. The exam tests your understanding that materialized views require deterministic, immutable expressions to guarantee consistency between the stored snapshot and the underlying data. Memory tip: if the function can change between runs, it’s a “non-det” that can’t be “mat’d.”

PCDE Practice Question: Define data structures and implement SQL for Business Intelligence

This PCDE practice question tests your understanding of define data structures and implement sql for business intelligence. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A BI dashboard query is slow and high cost. The query does multiple joins on large tables and uses window functions. The data engineer suggests using materialized views. However, the query uses non-deterministic functions. What is the limitation?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Materialized views cannot include non-deterministic functions

Materialized views store the result set of a query physically, like a table. If the query includes non-deterministic functions (e.g., NOW(), RAND(), CURRENT_TIMESTAMP), the stored result would become stale immediately because the function's output changes each time it is evaluated. Most SQL databases (e.g., PostgreSQL, Oracle, Snowflake) explicitly forbid non-deterministic functions in materialized view definitions to prevent this logical inconsistency.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Materialized views cannot include non-deterministic functions

    Why this is correct

    Materialized views require deterministic expressions to maintain consistency between base table changes.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Materialized views cannot be updated automatically

    Why it's wrong here

    BigQuery materialized views update automatically (or on a schedule) when base tables change.

  • Materialized views cannot be created with joins

    Why it's wrong here

    Materialized views support joins; they can include INNER JOINs and some OUTER JOINs.

  • Materialized views only support simple aggregation

    Why it's wrong here

    Materialized views support complex aggregations and some window functions (but not non-deterministic ones).

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the misconception that materialized views are 'static' and cannot be refreshed, or that they only support simple aggregations, when the real limitation is the prohibition of non-deterministic functions to ensure data consistency.

Detailed technical explanation

How to think about this question

Under the hood, a materialized view is essentially a cached snapshot of a query's result. When a non-deterministic function like RAND() is used, the database would have to decide which random value to store—defeating the purpose of caching. In PostgreSQL, for example, the CREATE MATERIALIZED VIEW statement will reject any query containing volatile functions (those with volatility category 'volatile'), as defined in the system catalog. In real-world BI scenarios, engineers often replace non-deterministic functions with deterministic alternatives (e.g., using a fixed timestamp column) to enable materialization.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A startup's cloud architect reviews their monthly bill and notices costs are higher than expected for a long-running batch job. Switching from on-demand instances to Reserved Instances — or using Spot/Preemptible VMs — can reduce compute costs by up to 72 %. Questions like this test whether you understand the tradeoffs between commitment, flexibility, and cost across cloud pricing models.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCDE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCDE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCDE question test?

Define data structures and implement SQL for Business Intelligence — This question tests Define data structures and implement SQL for Business Intelligence — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Materialized views cannot include non-deterministic functions — Materialized views store the result set of a query physically, like a table. If the query includes non-deterministic functions (e.g., NOW(), RAND(), CURRENT_TIMESTAMP), the stored result would become stale immediately because the function's output changes each time it is evaluated. Most SQL databases (e.g., PostgreSQL, Oracle, Snowflake) explicitly forbid non-deterministic functions in materialized view definitions to prevent this logical inconsistency.

What should I do if I get this PCDE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCDE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCDE exam.