1Z0-909 · Question #55
Examine this table definition: The table must always remain a valid document store collection. What restriction does this impose on any added column?
The correct answer is A. The column must be a generated column referencing any attribute of doc. Option A is correct because a MySQL Document Store collection is fundamentally defined by its doc JSON column as the single source of truth. To keep the table valid as a collection, any additional column must be a generated column derived from an attribute path within doc…
Question
Examine this table definition:
The table must always remain a valid document store collection. What restriction does this impose on any added column?
Exhibit
Options
- AThe column must be a generated column referencing any attribute of doc.
- BThe column must have a default value.
- CThe column must be used in a unique constraint.
- DThe column must be a generated column referencing only an existing attribute of doc.
- EThe column must be indexed.
How the community answered
(46 responses)- A85% (39)
- C4% (2)
- D2% (1)
- E9% (4)
Explanation
Option A is correct because a MySQL Document Store collection is fundamentally defined by its doc JSON column as the single source of truth. To keep the table valid as a collection, any additional column must be a generated column derived from an attribute path within doc - this ensures the relational layer stays in sync with the document layer and nothing exists outside the document's data.
Why the distractors fail:
- B (default value): A default value allows the column to exist independently of
doc, breaking the document-store contract wheredocmust contain all data. - C (unique constraint): Indexing strategy has no bearing on whether the table qualifies as a valid collection.
- D (only an existing attribute): This is the tricky near-miss. Generated columns reference JSON path expressions against
doc, not attributes that must already be present in every document - the path simply evaluates to NULL when absent, which is perfectly valid. - E (must be indexed): Indexing is optional; a generated column without an index still preserves collection validity.
Memory tip: Think "generated from doc, no restrictions on which path." The key words in A are generated (not a plain column) and any attribute (no pre-existence requirement) - together they define the minimal contract for keeping the table a valid document store.
Topics
Community Discussion
No community discussion yet for this question.
