Lesson 02 · 5 min
Reading the Model
Types, fields, cardinality, choices, and conditions: the grammar you need to read any schema.
A grammar with four words
Before touching products and trades, it pays to learn how to read the model. The good news: the whole CDM is written with a tiny grammar. Once you can read one type, you can read all 1,500 of them.
Types are the nouns
A type is a named bundle of fields, like
PriceorEconomicTerms. Types nest: fields point at other types, and big structures grow from small ones.Every field declares its cardinality
1..1means exactly one.0..1means optional.1..*means at least one, no upper bound. The numbers are promises about the data, enforced by validation.Choices are either/or
Some types say "exactly one of these": a
RateSpecificationis fixed or floating or inflation, never two at once.Conditions are the fine print
Beyond shapes, types carry named rules ("if there is an FX feature, quantities must reference two currencies"). Validation runs them automatically.
Reading a field row
Open any type in the explorer and you'll see rows like this one from EconomicTerms:
Read it left to right: the field is called payout, its cardinality says it must appear at least once (1..*), and each entry is a Payout. The type name is a link; clicking it takes you one level deeper. That is the entire navigation model of the CDM: follow the nouns.
Cardinality in the data itself
Cardinality shows up directly in JSON shape. A 1..1 field is an object; a 1..* field is an array. Compare:
{ "economicTerms": { "payout": [ { "interestRatePayout": { "dayCountFraction": "30E/360" } }, { "interestRatePayout": { "dayCountFraction": "ACT/360" } } ], "terminationDate": { "adjustableDate": { "unadjustedDate": "2031-06-15" } } }}
payout and keep following the nouns.01A field is declared as quantity : 0..* Quantity. What does that tell you?