What does the following item-descriptor demonstrate?

What does the following item-descriptor demonstrate?
<gsa-template>
<item-descriptor name = “animal”>
<table name = “animals” type = “primary” id-column-name = “id”>
<property name = “type” data-type = “enumerated”>
<option value = “squirrel” code = “2”>
</property>
</table>
<table name = “animal_address” type = “auxiliary” id-column-name = “id”>
<property name = “street” data-type = “string”>
<property name = “city” data-type = “string”>

<property name = “state” data-type = “string”>
</table>
</item-descriptor>
</gsa-template>

What does the following item-descriptor demonstrate?
<gsa-template>
<item-descriptor name = “animal”>
<table name = “animals” type = “primary” id-column-name = “id”>
<property name = “type” data-type = “enumerated”>
<option value = “squirrel” code = “2”>
</property>
</table>
<table name = “animal_address” type = “auxiliary” id-column-name = “id”>
<property name = “street” data-type = “string”>
<property name = “city” data-type = “string”>

<property name = “state” data-type = “string”>
</table>
</item-descriptor>
</gsa-template>

A.
Transient properties

B.
Item descriptorinheritance

C.
On-to-many relationship

D.
One-to-one relationship

Explanation:
Auxiliary Tables
You can handle some data relationships using auxiliary attribute tables. For example, you could
store users and their addresses in two related database tables, as described in the following piece
of an XML repository definition:
<item-descriptor name=”user”>
<table name=”dps_user” type=”primary” id-column-names=”id”>
<property name=”login” data-type=”string”/>
</table>
<table name=”dps_address” type=”auxiliary” id-column-names=”id”>
<property name=”address1″/>
<property name=”city”/>
<property name=”state”/>
<property name=”zip”/>
</table>
</item-descriptor>
Each user has a single address. For the purposes of this example, the user information is stored in
a separate table from the user’s address information.
Note: Primary and Auxiliary Tables
Each item descriptor must have one and only one primary table. The primary table is specified
using the type=”primary” XML attribute in a <table> tag. The primary table must define a column or
columns that store the repository ID. This column is specified using the id-column-names attribute.
For example:
<table name=”user” type=”primary” id-column-names=”id”>
properties…
</table>

ATG Repository Guide



Leave a Reply 0

Your email address will not be published. Required fields are marked *