nerdexam
Oracle

1Z0-860 · Question #204

Consider the following classes: 11.〦ntity Auction { 12. @ld int id; 13. @OneToOne Item item; 14.} 11.〦ntity Itemj 12. @ld int id; 13. @OneToOne (mappedBy="item") Auction auction; 14. } Given that…

The correct answer is C. The relationship is mapped to a foreign key in the AUCTION table. See the full explanation below for the reasoning.

Question

Consider the following classes: 11.〦ntity Auction { 12. @ld int id; 13. @OneToOne Item item; 14.} 11.〦ntity Itemj 12. @ld int id; 13. @OneToOne (mappedBy="item") Auction auction; 14. } Given that the Auction entity maps to an AUCTION database table and the Item entity maps to an ITEM database table, which statement is correct assuming there is NO mapping descriptor?

Options

  • AThe relationship is mapped to a foreign key in the ITEM table.
  • BThe relationship is mapped using a join table AUCTION ITEM.
  • CThe relationship is mapped to a foreign key in the AUCTION table.
  • DThe relationshipis mapped to foreign keys in both ITEM and AUCTION tables.

How the community answered

(29 responses)
  • A
    3% (1)
  • B
    7% (2)
  • C
    76% (22)
  • D
    14% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice