nerdexam
Oracle

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…

JSON

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

1Z0-909 question #55 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)
  • A
    85% (39)
  • C
    4% (2)
  • D
    2% (1)
  • E
    9% (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 where doc must 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

#JSON document storage#generated columns#collection constraints#document validation

Community Discussion

No community discussion yet for this question.

Full 1Z0-909 Practice