Question 358 of 503
Design and implement database schemasmediumMultiple ChoiceObjective-mapped

Quick Answer

The correct answer is that deleting a Singer row will automatically delete all associated Album rows. This is because the `ON DELETE CASCADE` clause on the foreign key from Albums to Singer enforces referential integrity at the database level, ensuring that when a parent row in the interleaved table hierarchy is removed, all child rows referencing it are also removed automatically. On the Google Professional Cloud Database Engineer exam, this concept tests your understanding of Cloud Spanner’s interleaved table relationships and how `ON DELETE CASCADE` behavior differs from standard foreign key constraints in other databases—a common trap is assuming you must manually delete child rows or that cascade only applies to indexed columns. Remember the memory tip: “Cascade cuts the chain—delete the parent, children fall away.”

PCDE Design and implement database schemas Practice Question

This PCDE practice question tests your understanding of design and implement database schemas. 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.

Exhibit

CREATE TABLE Singers (
  SingerId INT64 NOT NULL,
  FirstName STRING(1024),
  LastName STRING(1024),
  SingerInfo BYTES(MAX)
) PRIMARY KEY (SingerId);

CREATE TABLE Albums (
  SingerId INT64 NOT NULL,
  AlbumId INT64 NOT NULL,
  AlbumName STRING(1024)
) PRIMARY KEY (SingerId, AlbumId),
  INTERLEAVE IN PARENT Singers ON DELETE CASCADE;

Refer to the exhibit.

Which of the following statements is true regarding this schema design?

Question 1mediummultiple choice
Full question →

Exhibit

CREATE TABLE Singers (
  SingerId INT64 NOT NULL,
  FirstName STRING(1024),
  LastName STRING(1024),
  SingerInfo BYTES(MAX)
) PRIMARY KEY (SingerId);

CREATE TABLE Albums (
  SingerId INT64 NOT NULL,
  AlbumId INT64 NOT NULL,
  AlbumName STRING(1024)
) PRIMARY KEY (SingerId, AlbumId),
  INTERLEAVE IN PARENT Singers ON DELETE CASCADE;

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

Deleting a Singer row will automatically delete all associated Album rows.

Option A is correct because the `ON DELETE CASCADE` clause on the foreign key from `Albums` to `Singer` ensures that when a row in the `Singer` table is deleted, all rows in the `Albums` table that reference that singer are automatically deleted. This is a standard referential integrity behavior in relational databases, and in Cloud Spanner (the technology context for PCDE), it is enforced at the database level to maintain consistency.

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.

  • Deleting a Singer row will automatically delete all associated Album rows.

    Why this is correct

    The ON DELETE CASCADE clause enforces this behavior.

    Related concept

    Read the scenario before looking for a memorised answer.

  • The Albums table cannot have any secondary indexes because of the INTERLEAVE clause.

    Why it's wrong here

    Interleaved tables can have secondary indexes; the INTERLEAVE clause does not restrict them.

  • The Albums table's rows are physically stored independent of the Singer table.

    Why it's wrong here

    Interleaving co-locates child rows with the parent row for efficient joins.

  • The Albums table's primary key must include the SingerId column only.

    Why it's wrong here

    The primary key is (SingerId, AlbumId); SingerId alone is insufficient.

  • The ON DELETE CASCADE clause ensures that deleting an Album row will delete the corresponding Singer row.

    Why it's wrong here

    Cascade goes from parent to child, not child to parent.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the direction of `ON DELETE CASCADE` — candidates mistakenly think it deletes the parent when a child is deleted, but it only propagates from parent to child.

Detailed technical explanation

How to think about this question

In Cloud Spanner, interleaved tables use a parent-child relationship where child rows are stored physically interleaved with the parent row, optimizing join performance and reducing read latency. The `ON DELETE CASCADE` option is enforced at the database layer, and if a parent row is deleted, the database automatically deletes all interleaved child rows in the same transaction, ensuring referential integrity without application-level logic. This design is particularly useful for hierarchical data like a singer and their albums, where cascading deletes prevent orphaned records.

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 company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

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?

Design and implement database schemas — This question tests Design and implement database schemas — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Deleting a Singer row will automatically delete all associated Album rows. — Option A is correct because the `ON DELETE CASCADE` clause on the foreign key from `Albums` to `Singer` ensures that when a row in the `Singer` table is deleted, all rows in the `Albums` table that reference that singer are automatically deleted. This is a standard referential integrity behavior in relational databases, and in Cloud Spanner (the technology context for PCDE), it is enforced at the database level to maintain consistency.

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.