- 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.
- 摩登創(chuàng)客:與智能手機和平板電腦共舞
- Vue.js前端開發(fā)基礎(chǔ)與項目實戰(zhàn)
- Vue.js 2 and Bootstrap 4 Web Development
- JavaScript 網(wǎng)頁編程從入門到精通 (清華社"視頻大講堂"大系·網(wǎng)絡(luò)開發(fā)視頻大講堂)
- Android 9 Development Cookbook(Third Edition)
- AngularJS深度剖析與最佳實踐
- jQuery從入門到精通 (軟件開發(fā)視頻大講堂)
- Android 應(yīng)用案例開發(fā)大全(第3版)
- Python+Tableau數(shù)據(jù)可視化之美
- IBM RUP參考與認(rèn)證指南
- Spring Boot從入門到實戰(zhàn)
- 跟小樓老師學(xué)用Axure RP 9:玩轉(zhuǎn)產(chǎn)品原型設(shè)計
- Oracle Database 12c DBA官方手冊(第8版)
- Java程序性能優(yōu)化實戰(zhàn)
- Go語言編程之旅:一起用Go做項目