- 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.
- Vue 3移動(dòng)Web開發(fā)與性能調(diào)優(yōu)實(shí)戰(zhàn)
- 架構(gòu)不再難(全5冊(cè))
- MATLAB 2020 從入門到精通
- SQL for Data Analytics
- Blockly創(chuàng)意趣味編程
- Express Web Application Development
- HTML 5與CSS 3權(quán)威指南(第3版·上冊(cè))
- HTML5秘籍(第2版)
- 編寫高質(zhì)量代碼:改善Objective-C程序的61個(gè)建議
- Solutions Architect's Handbook
- 實(shí)戰(zhàn)Java高并發(fā)程序設(shè)計(jì)(第2版)
- 軟件體系結(jié)構(gòu)
- Instant GLEW
- 算法精解:C語言描述
- Microsoft Dynamics GP 2013 Cookbook