Simple query: Read
Less than to read
You need to use the _id reference key to read data.
If there is a natural key, the numeric key can be replaced by # followed by the natural key. However, the indicated key remains _id.
A natural key can have two or more components.
The following table shows two queries that return the same result.
|
|
|
You can read properties from the main node, but also from all the properties found in records that are referenced at any level. For this example, these are the properties associated with each currency.
The access method using the _id value or the natural key value works for nodes that have natural keys defined. However, not all nodes have natural keys. In this case, you can either:
- Use a query with a filtering condition on the document number
- Read with the _id value
A two-part key is a key composed of two natural keys.
A two-part key has the following structure: #key1|key2.
The following table displays the differences in the read operation between the use of the _id value and use of a two-part key:
|
|
|
|
</table>