Apache JDO Project - Schema files implementing inheritance proposal

This is Interesting: Free IT Magazines  
Home > Archive > Apache JDO Project > July 2005 > Schema files implementing inheritance proposal





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Schema files implementing inheritance proposal
Michael Watzek

2005-07-28, 7:45 am

Hi,

Craig suggested to begin the discussion about the inheritance proposal
with schema files. Attached you find schema files for application
identity for each inheritance mapping:

- schema.sql implements mapping 1:
This is the schema file in your TCK20 workspace. Thus, I did not attach it.

- schema1.sql implements mapping 2:
Separate table for each class in the inheritance hierarchy. Each table
contains columns for the declared fields. See tables "persons",
"employees", "parttimeemployees", "fulltimeemployees", "insuranceplans",
"medicalinsurance", and "dentalinsurance".

- schema2.sql implements mapping 3:
Separate table for each class in the inheritance hierarchy. No tables
for abstract classes. Each table contains columns for all fields.
Managers, mentors, hradvisors, and employees of the month are fulltime
employees. Only fulltime employees can have insurances, can be project
members, and can be project reviewers. Separate phone number type tables
for persons, fulltime employees, and parttime employees. See tables
"persons", "parttimeemployees", "fulltimeemployees",
"medicalinsurance", "dentalinsurance", "fulltime_employee_phoneno_type",
and "parttime_employee_phoneno_type".

- schema3.sql implements mapping 4:
Person has inheritance strategy "new-table. Employee has inheritance
strategy "subclass-table". PartTimeEmployee and FullTimeEmployee have
inheritance strategy "new-table". Insurance has inheritance strategy
"subclass-table". MedicalInsurance and DentalInsurance have inheritance
strategy "new-table". See tables "persons", "parttimeemployees",
"fulltimeemployees", "medicalinsurance" and "dentalinsurance".

- schema4.sql implements mapping 5:
Person, Employee, and Insurance have inheritance strategy "new-table".
PartTimeEmployee, FullTimeEmployee, MedicalInsurance, and
DentalInsurance have inheritance strategy "super-class". See tables
"persons", "employees", and "insuranceplans".

Please comment!

Regards,
Michael
--
-------------------------------------------------------------------
Michael Watzek Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de Buelowstr. 66
Tel.: ++49/30/235 520 36 10783 Berlin - Germany
Fax.: ++49/30/217 520 12 http://www.spree.de/
-------------------------------------------------------------------

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com