# Boolean Initials (T/F, Y/N)

Key: `representation.boolean.initials`

Boolean value represented as a single initial character: T/F (true/false) or Y/N (yes/no), in any case. Transforms to DuckDB BOOLEAN type.

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

Samples: `T`, `F`, `Y`, `N`, `t`, `f`, `y`, `n`

## Background

### Origin

The SQL:1999 standard introduced a BOOLEAN data type as an optional feature, numbered T031.[[1]](https://en.wikipedia.org/wiki/Boolean_data_type) Wikipedia records that, as of 2012, few major SQL systems implemented the T031 feature.[[1]](https://en.wikipedia.org/wiki/Boolean_data_type) MySQL treats BOOL and BOOLEAN as synonyms for TINYINT(1), with zero considered false and nonzero values true.[[2]](https://dev.mysql.com/doc/refman/8.4/en/numeric-type-syntax.html) Before Oracle Database 23c, also branded 23ai, Oracle SQL had no native BOOLEAN type.[[3]](https://www.dbvis.com/thetable/sql-boolean-type-how-to-use-it-in-all-major-relational-databases/)

PostgreSQL's boolean output function always emits either t or f.[[4]](https://www.postgresql.org/docs/current/datatype-boolean.html) PostgreSQL's boolean input accepts unique prefixes of true, yes, false and no, such as t or n, and ignores case.[[4]](https://www.postgresql.org/docs/current/datatype-boolean.html)

### Use

Python's distutils.util.strtobool counted y and t among its true values and n and f among its false values, and raised ValueError for anything else.[[5]](https://docs.python.org/3.11/distutils/apiref.html)

## Sources

1. [Boolean data type - Wikipedia](https://en.wikipedia.org/wiki/Boolean_data_type) — secondary source
2. [13.1.1 Numeric Data Type Syntax](https://dev.mysql.com/doc/refman/8.4/en/numeric-type-syntax.html) — documentation
3. [SQL Boolean Type: How to Use It in All Major Relational Databases](https://www.dbvis.com/thetable/sql-boolean-type-how-to-use-it-in-all-major-relational-databases/) — secondary source
4. [8.6. Boolean Type](https://www.postgresql.org/docs/current/datatype-boolean.html) — documentation
5. [9\. API Reference — Python 3.11.17 documentation](https://docs.python.org/3.11/distutils/apiref.html) — documentation
