- Learning PostgreSQL 11
- Salahaldin Juba Andrey Volkov
- 231字
- 2021-07-02 13:11:38
Attribute
Each attribute has a name and a domain, and the name should be distinct within the relation. The domain defines the possible set of values that the attribute can have. One way to define the domain is to define the data type and a constraint on this data type. For example, the hourly wage should be a positive real number and bigger than five if we assume that the minimum hourly wage is five dollars. The domain could be continuous, such as salary, which is any positive real number, or discrete, such as gender.
The formal relational model puts a constraint on the domain: the value should be atomic. Atomicity means that each value in the domain is indivisible. For instance, the name attribute domain is not atomic because it can be divided into first name and last name. Some examples of domains are as follows:
- Phone number: Numeric text with a certain length.
- Country code: Defined by ISO 3166 as a list of two-letter codes (ISO alpha-2) and three-letter codes (ISO alpha-3). The country codes for Germany are DE and DEU for alpha-2 and alpha-3 respectively.
- C語言程序設計(第2版)
- Mastering Python Scripting for System Administrators
- 秒懂設計模式
- OpenShift在企業中的實踐:PaaS DevOps微服務(第2版)
- Python:Master the Art of Design Patterns
- Python機器學習基礎教程
- Python數據結構與算法(視頻教學版)
- Learning OpenStack Networking(Neutron)(Second Edition)
- Mastering openFrameworks:Creative Coding Demystified
- HTML5秘籍(第2版)
- 21天學通C++(第5版)
- C語言程序設計習題與實驗指導
- C++語言程序設計
- FFmpeg開發實戰:從零基礎到短視頻上線
- 數據科學中的實用統計學(第2版)