Real Time Information Director User Documentation
RTID Metadata Language
Hewlett-Packard Company 63 529618-002
the next record the value 2, and so on. Given the automatic generation of IDs, an input
file, such as the ChinnAddEvent2.xml sample file, need not specify values for TESTID
in all TESTS records.
Partitioning Tables
This section contains information and examples related to partitioning data in the
Director. If you haven’t read the overview in “Partitioning,” in this document, do so
before proceeding.
Electronic Health Record Example
The class EHR.java contains examples of how to partition database tables. The next
several pages explain some of the code related to partitioning (some, but not all, because
the class contains similar code to partition a large number of tables).
The EHR.class requires the inclusion of the package that contains the document
definitions for the EHR demo. It also contains two classes you’d need for your own
solution:
• The EnrichedRecord class provides a convenient way to specify an enrichment
that multiple document definitions are likely to need. You’ll see EnrichedRecord
used later to incorporate partitioning into various database tables. Once you’ve
defined an enriched record, you can refer to it in place of a table or record name in
the invocation of other metadata classes. In fact, any enrichments that specify
artificial keys or partitioning should certainly be specified in an enriched record;
this enriched record, or some further-enriched record derived from it, should be
passed to all DocumentRecords and RelatedRecords that use the table.
• The Enrichment classes are required, because you have to use many of them to
specify partitioning.
package com.hp.ehr.documents;
import com.hp.rtid.metadata.EnrichedRecord;
import com.hp.rtid.metadata.enrichment.*;
public class EHR
The next few lines of metadata define values for partitioning parameters. In this case, the
data will be divided across four partitions, starting with partition 0. You need not use the
same number of partitions for all the tables in your solution, but the EHR application
does so for simplicity.
The partition range actually specifies the number of keys available for assignment to the
partition. In this case, each partition can have a million keys assigned to it.