Re: Few confusing things about first normal form
Date: Thu, 23 Oct 2008 05:04:31 -0700 (PDT)
On Oct 22, 7:35 pm, Sru..._at_gmail.com wrote:
> 1) For DB to be in 1NF there must be no multi-valued attributes, and
> no repeating groups. When so, data is said to be atomic. One site
> claims that even first name and last name must be featured in separate
> columns, but some other sites did put both first name and last name
> into a single column, and yet still claimed the table was in 1NF? So
> which is true?
The site you refer to, if you have understood it correctly, is mistaken. Both of the following are in 1NF:
R1 <name, age>
R2 <firstname, lastname, age>
It is a design decision which is appropriate for your task. However, in almost all cases the second will be by far the better design .
> a) What else do we mean by repeating groups? Just duplicative columns
> and multi-valued attributes, or …?
A repeating group occurs when there are attributes in a proposition which share the same role name. For example:
"person:Frank favourite pizza has topping:Peperoni, topping:Ham and topping:Pineapple on it".
In this instance the "topping" role represents a repeating group.
> b) What qualifies as a duplicative column? I imagine there are cases
> where it is not so obvious whether we are dealing with duplicative
> columns or not?
In my experience it is always extremely obvious.
> thank you
I would also echo Roy's sentiments concerning what is meant by atomicity. I understand Codd's use of the word atomic as meaning that a value cannot be decomposed by the relational algebra, unless it is a relation. That is not to say, of course, a particular DBMS will bolt on its own methods of decomposing data items - e.g. string or data functions - but these are (correctly) not part of the RA proper. Received on Thu Oct 23 2008 - 14:04:31 CEST