Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
24 views1 page

Sgececsc Myfile

This document discusses different types of entity associations in object-relational mapping including one-to-one, one-to-many, many-to-many, and ternary associations. It also covers using Maps for associations and handling legacy database schemas.

Uploaded by

gye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

Sgececsc Myfile

This document discusses different types of entity associations in object-relational mapping including one-to-one, one-to-many, many-to-many, and ternary associations. It also covers using Maps for associations and handling legacy database schemas.

Uploaded by

gye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Advanced entity association mappings 172

8.1 One-to-one associations 173


Sharing a primary key 173 ■ The foreign primary key
generator 176 ■ Using a foreign key join column 179
Using a join table 180
8.2 One-to-many associations 182
Considering one-to-many bags 183 ■ Unidirectional and
bidirectional list mappings 184 ■ Optional one-to-many
with a join table 186 ■ One-to-many association in an
embeddable class 188
8.3 Many-to-many and ternary associations 190
Unidirectional and bidirectional many-to-many associations 190
Many-to-many with an intermediate entity 192 ■ Ternary
associations with components 197
8.4 Entity associations with Maps 200
One-to-many with a property key 200 ■ Key/Value ternary
relationship 201
8.5 Summary 202
9 Complex and legacy schemas 203
9.1 Improving the database schema 204
Adding auxiliary database objects 205 ■ SQL constraints 208
Creating indexes 214
9.2 Handling legacy keys 215
Mapping a natural primary key 215 ■ Mapping a
composite primary key 216 ■ Foreign keys in composite
primary keys 218 ■ Foreign keys to composite primary
keys 221 ■ Foreign key referencing non-prim

You might also like