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> <Name type="mdex:string">Road-450</Name> <ProductID type="mdex:int">4038</ProductID> <BikeType type="mdex:string">Road Bikes</BikeType> <SizeRange type="mdex:string">42-46 CM</SizeRange> <Color type="mdex:string">Red</Color> <NumSold type="mdex:int">171</NumSold> <Price type="mdex:double">1457.99</Price> </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> <Name type="mdex:string">Road-450</Name> <ProductID type="mdex:int">4038</ProductID> <BikeType type="mdex:string">Road Bikes</BikeType> <SizeRange type="mdex:string">42-46 CM</SizeRange> <Color type="mdex:string">Red</Color> <ReviewScore type="mdex:int">35</ReviewScore> <ReviewScore type="mdex:int">45</ReviewScore> <ReviewScore type="mdex:int">60</ReviewScore> <Price type="mdex:double">1457.99</Price> </Record> <Record> <Name type="mdex:string">Touring-3000</Name> <ProductID type="mdex:int">4035</ProductID> <BikeType type="mdex:string">Mountain Bikes</BikeType> <SizeRange type="mdex:string">48-52 CM</SizeRange> <Color type="mdex:string">Yellow</Color> <Price type="mdex:double">742.35</Price> </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.