db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Some words for the spec
Date Thu, 04 Aug 2005 01:17:14 GMT
Javadogs,

I'd like to add some text to the spec. This is intended to improve  
the basic description of mapping relationships.

<spec 15.3>
Mapping Strategies
For single-valued relationships, there are three basic ways to map  
references from one persistence-capable class (the referring class)  
to a related class:

serialized: The entire related instance is serialized into a single  
column in the primary or secondary table of the referring class.

embedded: The related instance is mapped, field by field, to columns  
in the primary or secondary table of the referring class.

by reference: The related instance is in a different table, and the  
column in the primary or secondary table of the referring class  
contains a reference (often, a foreign key) to the primary table of  
the related class.

For multi-valued relationships, there are five basic ways to map  
references from one persistence-capable class (the referring class)  
to a related class:

serialized: The entire collection, array, or map is serialized into a  
single column in the primary or secondary table of the referring class.

serialized in a join table: A join table is used to associate  
multiple rows in the join table with a single row in the primary or  
secondary table of the referring class, and the related instances are  
serialized, one per row, into a single column in the join table.

embedded in a join table: A join table is used to associate multiple  
rows in the join table with a single row in the primary or secondary  
table of the referring class, and each related instance is mapped,  
one per row, field by field, into multiple columns in the join table.

by reference to the primary table of the related class: The related  
class has a reference (often, a foreign key) to the primary table of  
the referring class.

by reference in a join table: A join table is used to associate  
multiple rows in the join table with a single row in the primary or  
secondary table of the referring class, and a column in the join  
table contains a reference (often, a foreign key) to the primary  
table of the related class.
</spec>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


Mime
View raw message