ViewVC logotype

Contents of /trunk/projects/theory/snapdm/doc/ORMapping.txt

Parent Directory Parent Directory | Revision Log Revision Log

Revision 293 - (show annotations)
Sun Apr 27 13:05:54 2008 UTC (13 years, 1 month ago) by gerard.lemson
File MIME type: text/plain
File size: 1667 byte(s)
Moved intermediateModel.xsd to input and added images for use in the NOte. Updated the NOte as well.
1 Object-Relational Mapping
2 =========================
3 Here we describe our Object-Relational mapping strategy, mapping the OO
4 UML model to a relational database schema.
5 For now (2008-04-13), we are using an implicit mapping strategy, i.e.
6 we do not support explicit mapping indicators in the UML model or
7 elsewhere. This implies that we need to choose a single strategy when generating
8 DDLs and JPA mapping for the generated Java classes for example.
10 The following is a list of choices we have made.
11 1. single bigint/long ID column, supported by a Long id field on the MetadataObject base class.
12 2. inheritance: choices are
13 (i) single table for complete inheritance hierarchy
14 (ii) joined tables
15 (iii) single, complete table per class.
17 (i) implies we need to join all columns from all classes in an inheritance hierarchy
18 in a single class.
19 It also implies we need to include a "class" column.
20 This must be taken into account by ADQL queries.
21 (ii) is easiest to generate using XSLT as only the contents of a given class have to be
22 taken into account.
23 (iii) is easiest to query using ADQL.
24 3. if we choose multiple types in a single table, then we are in general unable to use
25 "not null" constraints on columns. For though this may be applicable for some of the subclasses,
26 for which the column is defined, for others this is not the case.
27 4. Attributes whose type is a complex datatype, i.e. a datatype with attributes,
28 are mapped to multiple columns, each corresponding to an attribute of the DataType.
29 This is applied recursively in case the datatype's attributes are themselves complex data types.

ViewVC Help
Powered by ViewVC 1.1.26