Professional Documents
Culture Documents
4.2 Normalization
Normalization is the process of efficiently organizing data in a database. There are two goals
of the normalization process: eliminating redundant data (for example, storing the same data
in more than one table) and ensuring data dependencies make sense (only storing related
data in a table). Both of these are worthy goals as they reduce the amount of space a
database consumes and ensure that data is logically stored.
Database normalization is the process of organizing the attributes and tables of a relational
database to minimize data redundancy.
Normalization involves refactoring a table into smaller (and less redundant) tables but
without losing information; defining foreign keys in the old table referencing the primary
keys of the new ones. The objective is to isolate data so that additions, deletions, and
modifications of an attribute can be made in just one table and then propagated through the
rest of the database using the defined foreign keys.
4.3.2 Collocation
A common problem occurs when tables need to join and the join columns are not
collocated on the same node. When this happens data for one table will need to be
shipped from remote nodes to join with data at the local node. This is a very
expensive process that can cripple the benefits of shared-nothing processing.
4.4 Constraints
Database constraints are user-defined structures that let you restrict the behaviours of
columns. There are five types of database constraints. They are:
4.4.1 CHECK Constraint
CHECK constraints are table-level constraint. You can only create table-level
constraints as out-of-line constraints. You typically restrict a column value with
a CHECK constraint to a set of values defined by the constraint. A CHECK constraint
doesn’t make the column mandatory, which means the default is the ANSI standard
for null able columns. A cardinality of 0:1 (optional) is the ANSI standard. You
override it by providing a NOT NULL constraint. The NOT NULL constraint makes the
column cardinality 1:1 or mandatory.
Reference
http://www.ibm.com/developerworks/library/co-tipld3/index.html
http://en.wikipedia.org/wiki/Data_integrity
http://databases.about.com/od/specificproducts/a/normalization.htm
http://en.wikipedia.org/wiki/Database_normalization
https://books.google.com.my/