Record Foreign Key Coverage Table
Audit typed-scalar foreign-key coverage against an explicit reference inventory; absent and unmatched values remain distinct.
Description
Audit typed-scalar foreign-key coverage against an explicit reference inventory; absent and unmatched values remain distinct.
Foreign-key coverage asks whether a record's key occurs in a supplied reference set. A missing property differs from a present property whose value is null.
When to use this tool
Audit typed-scalar foreign-key coverage against an explicit reference inventory; absent and unmatched values remain distinct.
- Prepare the supplied recordsJson, keyField, referenceKeysJson fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter recordsJson, keyField, referenceKeysJson. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.coverage. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Parse scalar reference keys into typed serialized keys. For every record, report its index, whether keyField is an own property, and whether that scalar key belongs to the reference set.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| recordsJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
| keyField | key field. | Text; at most 8,192 UTF-16 code units, subject to the grammar above |
| referenceKeysJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "recordsJson",
"decoded": [
{
"id": 1
},
{
"id": 2
},
{}
]
},
{
"field": "referenceKeysJson",
"decoded": [
1
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.coverage | The coverage list in the ordering and representation described above. |
{
"input": {
"recordsJson": "[{\"id\":1},{\"id\":2},{}]",
"keyField": "id",
"referenceKeysJson": "[1]"
},
"output": {
"result": {
"coverage": [
{
"recordIndex": 0,
"keyPresent": true,
"covered": true
},
{
"recordIndex": 1,
"keyPresent": true,
"covered": false
},
{
"recordIndex": 2,
"keyPresent": false,
"covered": false
}
]
}
}
} Limitations and assumptions
- Number and string spellings remain distinct; null is a valid scalar key. The tool audits supplied records only and does not query a database or enforce a constraint.
- Decoded JSON is bounded to 20,000 nodes and 32 nesting levels; record arrays have at most 128 records. Parsed number values use JavaScript floating point rather than arbitrary-precision decimal arithmetic.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Ordinary string lists have at most 128 entries of at most 128 code units each; numeric lists and matrices have separate bounded size checks. Nonfinite results and excessively large serialized outputs are rejected.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
For document-wide requirements, combine these structural inventories with an explicit JSON Schema. Preserve the distinction between missing properties and null values, and between numbers and numeric-looking strings when building joins or indexes.
References
Similar or alternative tools
- Record Key Multiplicity Audit
Audit typed-scalar record key multiplicities while retaining missing-key records and duplicate positions.
- Record Key Value Transposer
Transpose own object members to ordered key/value entry records without flattening nested values.