Determining if a relation is 1NF with no data

后端 未结 1 1984
谎友^
谎友^ 2021-01-17 01:03

I have a relation

CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)
Primary Key: {Car#, Salesperson#}
Additional Dependencies: Date_sold -&g         


        
相关标签:
1条回答
  • 2021-01-17 01:58

    Many people use "1NF" to mean some vague notion of the types of attributes all being some vague way called "atomic". Codd originally meant "normalized", later "1NF", to mean having no attributes that were themselves relations. All other uses of "atomic" are confused unhelpful unjustified received wisdom, and whether a value is "atomic" is ultimately in practice whether it has no parts that you want to be the values for some attribute in a tuple in a relation that is a query result. In either case, you can't tell just from the attributes whether a relation is in 1NF. If you are told the types of the attributes, and clear criteria for "atomic" (which Codd gave: not being a relation) then you can tell. Other people find "1NF" unhelpful or define it as "is a relation". Just make sure you find out what is meant when you hear/see "1NF" used. (Good luck with ever getting a sensible definition for "atomic".)

    Sometimes people wrongly use "repeating group" for "non-atomic". (But a repeating group is actually a notion from pre-relational non-relational databases that cannot appear in a relation.)

    Sometimes people vaguely confusedly unhelpfully wrongly include that a relation can't have multiple values for an attribute in a tuple, which is not possible anyway, since a relation by definition has one value for an attribute in a tuple.

    Sometimes people vaguely confusedly unhelpfully wrongly include in their "1NF" that there are not multiple similar attributes, for some notion of similarity.

    See this answer and this one.

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