# Boolean Terms (True/False, Yes/No)

Key: `representation.boolean.terms`

Boolean value represented as a full word or phrase: true/false, yes/no, on/off, enabled/disabled, active/inactive. Any casing (TRUE, True, true). Transforms to DuckDB BOOLEAN type.

Page: <https://meridian.online/docs/projects/finetype/types/representation/boolean/terms>

Samples: `true`, `false`, `yes`, `no`, `on`, `off`, `True`, `False`

## Background

### Origin

FineType defines Boolean Terms itself, as a boolean value written as a full word: true/false, yes/no, on/off, enabled/disabled or active/inactive, in any casing.[[1]](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml) The Boolean data type is named after George Boole, who first defined an algebraic system of logic in the mid-19th century.[[2]](https://en.wikipedia.org/wiki/Boolean_data_type)

The core schema in YAML 1.2.2 resolves only true, True, TRUE, false, False and FALSE to the boolean tag.[[3]](https://yaml.org/spec/1.2.2/) The SQL:1999 standard introduced a BOOLEAN data type as an optional feature (T031).[[2]](https://en.wikipedia.org/wiki/Boolean_data_type)

### Use

RFC 8259, the JSON standard, says the literal names false, null and true must be lowercase.[[4]](https://www.rfc-editor.org/rfc/rfc8259) XML Schema 1.1 gives boolean a lexical space of four literals: true, false, 1 and 0.[[5]](https://www.w3.org/TR/xmlschema11-2/) The Frictionless Table Schema casts strings in a boolean field using trueValues and falseValues, which default to true, True, TRUE and 1, and false, False, FALSE and 0.[[6]](https://specs.frictionlessdata.io/table-schema/) PostgreSQL's boolean input accepts true, yes, on and 1 for the true state, and false, no, off and 0 for the false state.[[7]](https://www.postgresql.org/docs/current/datatype-boolean.html) PostgreSQL's boolean input ignores leading or trailing whitespace, and case does not matter.[[7]](https://www.postgresql.org/docs/current/datatype-boolean.html)

The StrictYAML documentation, in a page titled The Norway Problem, shows PyYAML loading an unquoted NO in a list of country codes as the boolean False.[[8]](https://hitchdev.com/strictyaml/why/implicit-typing-removed/) The StrictYAML documentation gives quoting the value, as 'NO', as the quick fix.[[8]](https://hitchdev.com/strictyaml/why/implicit-typing-removed/) When a yes/no column sits next to country codes, language codes or initials, check that a short code has not been turned into a boolean somewhere upstream. (Meridian's view)

### Where you'll meet it

GLEIF's LEI-CDF Format 3.1 says an EntityStatus value in a conforming file shall be one of the code strings ACTIVE, INACTIVE or NULL.[[9]](https://www.gleif.org/about-lei/common-data-file-format/lei-cdf-format) GLEIF's LEI-CDF Format 3.1 describes NULL as meaning the entity status is not applicable.[[9]](https://www.gleif.org/about-lei/common-data-file-format/lei-cdf-format)

## Sources

1. [finetype/labels/definitions\_representation.yaml at main · meridian-online/finetype · GitHub](https://github.com/meridian-online/finetype/blob/main/labels/definitions_representation.yaml) — FineType
2. [Boolean data type - Wikipedia](https://en.wikipedia.org/wiki/Boolean_data_type) — secondary source
3. [YAML Ain’t Markup Language (YAML™) revision 1.2.2](https://yaml.org/spec/1.2.2/) — standard
4. [RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format](https://www.rfc-editor.org/rfc/rfc8259) — standard
5. [W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes](https://www.w3.org/TR/xmlschema11-2/) — standard
6. [Table Schema \| Data Package (v1)](https://specs.frictionlessdata.io/table-schema/) — standard
7. [8.6. Boolean Type](https://www.postgresql.org/docs/current/datatype-boolean.html) — documentation
8. [The Norway Problem - why StrictYAML refuses to do implicit typing and so should you - HitchDev](https://hitchdev.com/strictyaml/why/implicit-typing-removed/) — secondary source
9. [Level 1 Data: LEI-CDF Format  3.1 - LEI Data: Access \& Use - LEI Data – GLEIF](https://www.gleif.org/about-lei/common-data-file-format/lei-cdf-format) — organisation
