Normalization in database management system

前端 未结 1 576
甜味超标
甜味超标 2020-11-22 00:16

I have a relation in a database:

Emp_project(SSN,PNum,Hours,Ename,PName,Plocs)

I have been asked to normalize the relation Emp_projec

1条回答
  •  粉色の甜心
    2020-11-22 01:16

    A relation has an associated set of columns of any type and an associated set of rows. There is one value per column per row.

    Sometimes "normalize" is used to mean (1) "decompose each relation to smaller relations that are its projections and that join back to it". This is normalization to higher NFs (normal forms) than 1NF. This involves FDs (functional dependencies), JDs (join dependencies) and normalization theory. Maybe some prior "NF" is assumed. Maybe then putting into some "1NF" is included. But decomposition only needs relations.

    Sometimes "normalize" is used to mean (2) "convert from relations that have relation-valued columns to relations that don't". (That was its original meaning.) Ubiquitously "normalize" is (wrongly & vaguely) used to mean (3) "convert from a relation with columns with some types that have multiple parts to relations with columns with the types of the parts". The undesired columns are called "non-atomic", "composite", etc. (This is a misinterpretation of (2).) After (1) was developed these uses of "normalization" became "put into 1NF".

    Sometimes "relation" means a relation. Sometimes it (forgivably) means a relation with no relation-valued columns. Sometimes it (wrongly) means a relation with no "non-atomic" columns. Sometimes "0NF" means "is not relations". Sometimes "0NF" means "is a relation". Sometimes "1NF" means "is a relation".

    Sometimes "normalize" is (wrongly) used to mean (4) "convert from non-relations to relations" that are "0NF" or "just relations" and/or "1NF". (And usually what the non-relational data structure is supposed to mean in terms of relations is not explained. So "normalize" is not actually defined.) Sometimes presentations of (3) write as though there were multiple values per column per row, but that cannot be, since a relation by definition has one value per column per row, so they are confused about whether they are in (3) or (4).

    Sometimes "normalize" is (wrongly) used to mean (5) "convert from a relation with some columns plus one additional column per value in a range to a relation with only one additional column but with each row of the original replaced by a row for each dropped column". Sometimes (4) or (5) are (wrongly) called "getting rid of a repeating group". (Which is a pre-relational non-relational notion.) Sometimes "normalize" is (wrongly) used to mean (6) "convert from a relation with columns with certain values to a relation with columns with ids plus some relation(s) associating ids with those values".


    So, what do you mean, "normalize"? In this question one of the columns, Plocs, seems to be "project locations". So maybe "normalize" is used in sense 3, and maybe some others. You have to look at what you were taught and what references you were given.

    0 讨论(0)
提交回复
热议问题