SQLite Forum

Sqlite3 Trigger
Login
from https://sqlite.org/datatype3.html

"2.1. Boolean Datatype
SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true)."

Your type name BOOLEAN translates to NUMERIC affinity, i.e. SQLite will store "strings that look like numbers" as INTEGER or REAL if possible. You could literally store 'any shit' in Theorie and it would come out NOT NULL.

BTW:

"PruefungsID int not null primary key check(...)" is better formulated as "PruefungsID integer primary key" which makes it an alias for the rowid, which is guaranteed to be NOT NULL and greater than zero. It also allows faster lookups.

"Gebuehr float not null check(...)" is not a good way to store "money". Not all decimal fractions have an exact representation in binary floating point, and so totalling up all Gebuehr values may exhibit rounding errors. Money is usually stored in the lesser unit (Cents instead of Euro), leaving the formatting up to the presentation layer, where it belongs.

"Email varchar[50]" is better written as text, because SQLite stores strings of arbitrary length (up to the supported maximum) and does not enforce the declared length. If your application only supports 50 character strings, then you need to add "check(length(Email) < 50)"