Oracle
1Z0-873 · Question #115
1Z0-873 Question #115: Real Exam Question with Answer & Explanation
The correct answer is B. The parent & child must have the same data type.. 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.)
Question
When working with InnoDB, which of the following are true of a parent / child foreign key relationship?
Options
- AThe parent & child can have separate data types.
- BThe parent & child must have the same data type.
- CThe parent & child may sometimes need the same data type, but not always.
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.)
Community Discussion
No community discussion yet for this question.