• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

my exam cloud mock 3, about unidirectional relationship

 
Ranch Hand
Posts: 1749
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


...Quest cloning actually creates duplicate questions prior to assign to a test... The new relationship between Test and Question will be:

Each test can have one or more questions.
Quest need not reference a test.
Select the best design approach for this scenario?
a. There is no way to implement this requirement.

b. introduce new join table name Question_Test. This join table must have two foreign key columns. One foreign key column refers to table Question and other must refer to table Test. Use oneToMany bidirectional relationship to implement data access for this tables.

c. European client must use the same functionality without question cloning to avoid this issue.

d. Introduce new join table named Question_Test. This join table must have two foreign key columns. One foreign key column refers to table Question and other must refer to table Test. Use oneToMany unidirectional relationship Question and Question_Test and oneToMany unidirectional relationship between Question and Question_Test to implement data access for this tables.

Given answer is B.
The relationship refers unidirectional oneToMany relationship.
Entity Question does not reference a Test.
Entity Test reference a collection of Entity Question.
This join table must be have two foreign key columns to make unidirectional relationship between Question and Test.




I believe the answer should be D.
B mentions it is a bidirectional relationship. But in the explanation, it says "the relationship refers unidirectional oneToMany relationship".
So, I think B is not the answer.
 
Creator of Enthuware JWS+ V6
Posts: 3293
296
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

B mentions it is a bidirectional relationship. But in the explanation, it says "the relationship refers unidirectional oneToMany relationship".  


That must be a mistake...

D is looks better but it talks about having two unidirectional OneToMany relationships???

Use oneToMany unidirectional relationship Question and Question_Test and oneToMany unidirectional relationship between Question and Question_Test

 
I’m tired of walking, and will rest for a minute and grow some wheels. This is the promise of this tiny ad:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!