Project

General

Profile

Bug #1705

DMO index cleanup

Added by Constantin Asofiei over 11 years ago. Updated over 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Constantin Asofiei over 11 years ago

Following are details about the DMO index cleanup task. I have no usefull info related to this.

Original requirements:
Since dmo_index.xml is a file that TIMCO developers will have to maintain as they change the Majic schema going forward, I would like to remove some redundancies in that file that make it bloated and harder to maintain:

a. The "unique" child element of the "class" element is unnecessary. Unique constraint information is available through the JDBC metadata interface and in fact we already use it in certain parts of the persistence runtime (see Persistence.queryIndexData() and its callers). The only remaining part of P2J that still queries dmo_index.xml for this information is SortCriterion.java. This class should be retrofitted so that it uses the metadata mechanism and thus no longer needs to get this information out of the dmo_index.xml file. Once that is done, conversion can be modified to avoid adding the "unique" element. For temp tables, the "unique" element is redundant with the "index" element, which has a "unique" attribute. Temp tables may require special consideration here, because the information on unique indexes is read from dmo_index.xml to create the indexes in the first place. You will need to make sure the order of creation and subsequent querying of metadata is correct, or otherwise invent a way to deal with this potential issue.

b. The "foreign" child element of the "class" element is unnecessary when foreign key generation is disabled for conversion (see the "foreign-keys" parameter in the p2j.cfg.xml file).

Also available in: Atom PDF