Oracle
1Z0-873 · Question #116
When working with InnoDB, which of the following is true when trying to create foreign key references?
The correct answer is C. Both the parent & child columns must be indexed. E. InnoDB may create an index automatically. In a foreign key relationship, the referring column and the referenced column should have the same data type, and both must be indexed. (If the referring column has no index, InnoDB creates an index on it automatically.)
InnoDB Storage Engine
Question
When working with InnoDB, which of the following is true when trying to create foreign key references?
Options
- AOnly the child column must be indexed.
- BOnly the parent column must be indexed.
- CBoth the parent & child columns must be indexed.
- DInnoDB will not create an index automatically.
- EInnoDB may create an index automatically.
How the community answered
(28 responses)- A7% (2)
- B11% (3)
- C79% (22)
- D4% (1)
Explanation
In a foreign key relationship, the referring column and the referenced column should have the same data type, and both must be indexed. (If the referring column has no index, InnoDB creates an index on it automatically.)
Topics
#InnoDB#foreign key indexes#automatic indexing#parent-child columns
Community Discussion
No community discussion yet for this question.