The following examples of records demonstrate different configurations of standard attributes and their values (key-value pairs).
In the examples, each row in the table represents a single record, in this case, a bicycle. The column headings are standard attributes, and each cell contains a standard attribute value (key-value pair).
Name | Bike Type | ProductID | Size Range | Color | Number Sold | Price |
---|---|---|---|---|---|---|
Road-450 | Road Bikes | 4038 | 42-46 CM | Red | 171 | 1457.99 |
Road-550-W | Road Bikes | 5213 | 38-40 CM | Yellow | 455 | 1000.48 |
Touring-1000 | Touring Bikes | 8765 | 54-58 CM | Blue | 117 | 2384.07 |
Touring-3000 | Touring Bikes | 4035 | 48-52 CM | Yellow | 221 | 742.35 |
Mountain-300 | Mountain Bikes | 3421 | 38-40 CM | Black | 223 | 1079.99 |
Mountain-500 | Mountain Bikes | 4821 | 38-40 CM | Silver | 176 | 564.99 |
The XML representation of the Road-450 record may look similar to the following example:
<Record> <attribute name="Name" type="mdex:string">Road-450</attribute> <attribute name="ProductID" type="mdex:int">4038</attribute> <attribute name="BikeType" type="mdex:string">Road Bikes</attribute> <attribute name="SizeRange" type="mdex:string">42-46 CM</attribute> <attribute name="Color" type="mdex:string">Red</attribute> <attribute name="NumSold" type="mdex:int">171</attribute> <attribute name="Price" type="mdex:double">1457.99</attribute> </Record>
Notice the primary key attribute, which in this case is the ProductID attribute. This primary key attribute is used by the Oracle Endeca Server to uniquely identify this record. At the data loading stage, you decide which of your standard attributes is going to be the primary key attribute.
This example uses the same data as the previous example, but adds a Review Score attribute. For the Review Score attribute, some records have multiple assignments and some have no assignments.
For example, the Road-450 record has multiple review scores and the Touring-3000 record has no review scores.
Name | Bike Type | ProductID | Size Range | Color | Review Score | Price |
---|---|---|---|---|---|---|
Road-450 | Road Bikes | 4038 | 42-46 CM | Red | 35, 45, 60 | 1457.99 |
Road-550-W | Road Bikes | 5213 | 38-40 CM | Yellow | 80, 82 | 1000.48 |
Touring-3000 | Touring Bikes | 4035 | 48-52 CM | Yellow | 742.35 | |
Mountain-500 | Mountain Bikes | 4821 | 38-40 CM | Silver | 76 | 564.99 |
The XML representation of the Road-450 and Touring-3000 bikes may look similar to the following example:
<Record> <attribute name="Name" type="mdex:string">Road-450</attribute> <attribute name="ProductID" type="mdex:int">4038</attribute> <attribute name="BikeType" type="mdex:string">Road Bikes</attribute> <attribute name="SizeRange" type="mdex:string">42-46 CM</attribute> <attribute name="Color" type="mdex:string">Red</attribute> <attribute name="ReviewScore" type="mdex:int">35</attribute> <attribute name="ReviewScore" type="mdex:int">45</attribute> <attribute name="ReviewScore" type="mdex:int">60</attribute> <attribute name="Price" type="mdex:double">1457.99</attribute> </Record> <Record> <attribute name="Name" type="mdex:string">Touring-3000</attribute> <attribute name="ProductID" type="mdex:int">4035</attribute> <attribute name="BikeType" type="mdex:string">Mountain Bikes</attribute> <attribute name="SizeRange" type="mdex:string">48-52 CM</attribute> <attribute name="Color" type="mdex:string">Yellow</attribute> <attribute name="Price" type="mdex:double">742.35</attribute> </Record>
The XML for the Road-450 record contains three ReviewScore elements, one for each score. Because the Touring-3000 record does not have any review scores, it does not include a ReviewScore element.