IT lexicon › Database › Domain

Domain

Database På svenska → Updated: 2026-11-12

A named set of allowed values for an attribute in the relational model; the semantic value space for a column.

In Codd's 1970 relational model, a domain is the semantic unit defining what kind of data a relation can contain. A domain named "EmailAddress" might be all valid email formats; a domain "Year" might be integers between 1900 and 2100. Domains ensure consistency of meaning across multiple relations—two different tables both using the "EmailAddress" domain can reliably join on that field because they mean the same thing.

Modern SQL databases implemented domains as data types (INTEGER, VARCHAR, DATE), but the relational algebra notion of domain is more semantic. It's about which values are *meaningful* in context, not just how many bytes they occupy. This distinction often got lost in translation from mathematical model to SQL implementation, reducing domains to type checking rather than semantic validation.

← Back to the lexicon