0

I have a relation

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

and I have to determine if it is in 1NF, 2NF, or 3NF. We are only given the relation schema with no data. I am having trouble determining if this is in 1NF. In order for something to be in 1NF, it must not have repeating groups for an attribute. Given this relation schema with no actual data, wouldn't it be impossible to tell? Wouldn't I need actual data in order to determine if it would be 1NF? Or would the existence of a primary key let me know that no attributes would be repeated?

I know for 2NF, it must be in 1NF and all non-key attributes must depend on the primary key, and for 3NF, it must be in 2NF and no translational dependencies.

philipxy
  • 14,867
  • 6
  • 39
  • 83
GenericUser01
  • 337
  • 3
  • 11
  • 27
  • http://stackoverflow.com/a/23202535/562459 – Mike Sherrill 'Cat Recall' Apr 10 '17 at 02:02
  • Your attempts at 2NF & 3NF definitions are so sloppy that they don't mean anything. (Even when "translational" is corrected to "transitive".) Read some actual textbook definitions. Details matter. PS See also [my answer](http://stackoverflow.com/a/26952821/3404097) to the question that the comment by MikeSherrill'CatRecall' links to. – philipxy Apr 10 '17 at 10:21

1 Answers1

0

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.

Community
  • 1
  • 1
philipxy
  • 14,867
  • 6
  • 39
  • 83