0 votes
35 views

Explain annotation in EJB to do the database entity relationships/mappings.

in Technology by (192k points)

1 Answer

0 votes

EJB 3.0 provides option to define database entity relationships/mappings like one to one, one to many, many to one and many to many relationships. Following are the relevant annotations:

  • OneToOne - Objects are having one to one relationship. For example, a passenger can travel using a single ticket at time.

  • OneToMany - Objects are having one to many relationship. For example, a father can have multiple kids.

  • ManyToOne - Objects are having many to one relationship. For examples, multiple kids having a single mother.

  • ManyToMany - Objects are having many to many relationship. For examples, a book can have mutiple authors and a author can write multiple books.

by (192k points)

Related questions

0 votes
1 answer 36 views
36 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 15 views
0 votes
1 answer 31 views
31 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 30 views
30 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 16 views
16 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 22 views
22 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 12 views
12 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 26 views
26 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 13 views
13 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 15 views
15 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 15 views
15 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 17 views
17 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 14 views
0 votes
1 answer 29 views
29 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 110 views
0 votes
1 answer 23 views
0 votes
1 answer 13 views
0 votes
1 answer 16 views
0 votes
1 answer 24 views
24 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 13 views
13 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 13 views
13 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 18 views
18 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 43 views
43 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 15 views
15 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
0 votes
1 answer 22 views
22 views asked Nov 7, 2020 in Technology by JackTerrance (192k points)
...