Attribute domain


title: "Attribute domain" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["type-theory", "database-theory"] topic_path: "technology/computing" source: "https://en.wikipedia.org/wiki/Attribute_domain" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

In computing, the attribute domain is the set of values allowed in an attribute.

For example: Rooms in hotel (1–300) Age (1–99) Married (yes or no) Nationality (Nepalese, Indian, American, or British) Colors (Red, Yellow, Green)

For the relational model it is a requirement that each part of a tuple be atomic. The consequence is that each value in the tuple must be of some basic type, like a string or an integer. For the elementary type to be atomic it cannot be broken into more pieces. Alas, the domain is an elementary type, and attribute domain the domain a given attribute belongs to an abstraction belonging to or characteristic of an entity.

For example, in SQL, one can create their own domain for an attribute with the command

::code[lang=sql] CREATE DOMAIN SSN_TYPE AS CHAR(9); ::

The above command says: "Create a datatype SSN_TYPE that is of character type with size 9".

References

References

  1. (1999). "A Guided Tour of Relational Databases and Beyond". Springer.
  2. Narang, Rajesh. (2011). "Database Management Systems". PHI Learning Pvt. Ltd..

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

type-theorydatabase-theory