Hadoop to build a data warehouse practice reading notes [3] __ data warehouse design basis

relational database

Table of attributes:

  1. Each table has a unique name.
  2. A table, each column has a different name.
  3. The value of a column from the same attribute domains.
  4. Column is disordered.
  5. Rows are unordered.

Candidate key:

Ultra contains the minimum number that uniquely identifies key records necessary for the column only. Candidate key list has three properties:

  • Uniqueness: in each record, the value of the key that uniquely identifies the candidate record.
  • Minimum: the minimum subset of ultra-unique key attributes.
  • Nonemptiness: value candidate keys NOT NULL

Primary key:

Identify unique candidate key recorded in the table. A primary key is a unique, non-empty. Has not been selected as a primary key is a candidate key is called alternate keys. In selecting a primary key, we can refer to the following principles:

  • Primary key is smaller as possible
  • Primary key should not be changed. The primary key is referenced by other tables. If you change the value of the primary key, all references to the primary key values ​​need to be modified, or reference is invalid.
  • The primary key usually using a digital type, a digital type of the primary key of a higher efficiency than other data types.
  • Primary key should be a useless business meaning, it should not contain the actual business information, meaningless numeric column does not require modification, and therefore is thought to select the primary key. Most relational databases supported by property or sequence object is more suitable as a primary key.
  • While allowing a multi-primary key columns, but the column should be used as little as possible, preferably a single row.

The main language is the SQL relational database language.

Disadvantage of the relational data model: the need to build additional storage area data marts, and the corresponding increase in data loading process. Use of the data warehouse is strongly dependent on the mastery of the SQL language.

 

Guess you like

Origin www.cnblogs.com/astride/p/11202087.html