Database 1NF vs. multivalue fields (was: Re: NBLUG Library ?)

augie schwer at sonic.net
Fri Oct 25 14:01:28 PDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Oct 25, 2002 at 01:27:07PM -0700, Eric Eisenhart wrote:
> On Thu, Oct 24, 2002 at 10:17:09PM -0600, hanksdc at plug.org wrote:
> > While I'd need to look at the MARC format a little more to fully
> > understand this, a design much like this could still adhere to the
> > relational model (and yes, still be 'proper'). Essentially you would have
> > to design a user-defined type (let's call it multi-value-triple), along
> > with the appropriate operators to manipulate that type, as well as
> > means to enforce the allowable domain of values possible for that type.
> > Postgres allows you to do this. But despite the apparent lack of atomicity,
> > such a design would still be in 1st normal form, and hence, faithfully
> > adhere to the relational model, which prescribes that each table be at
> > least in 1NF.
> 
> First normal form specifically and singularly forbids multi-valued fields.
> "In First Normal Form, each column must contain only a single value and each
> row must contain the same columns."
> There's 2 rules, and multi-valued fields are, very precisely, the primary
> thing forbidden by first normal form.  (the same columns issue is,
> essentially, a way to avoid a workaround that creates the same issue)

i certainly don't claim absolute experience on this matter, but what i
took from hank's post was that if you create your own type the
attribute is no longer a mult-valued attribute, but an atomic (or
indivisible) value. thus conforming to 1NF

the example in my head is that INT, and TEXT, or any other type all
allow you to enter multiple values, but because those values will be
of one type, they may be viewd as atomic.

 -augie


- -- 
irc.nblug.org #nblug
registered linux user #229905
gpg public key: http://www.sonic.net/schwer/schwer.asc
Key fingerprint = 9815 AE19 AFD1 1FE7 5DEE  2AC3 CB99 2784 27B0 C072

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE9ubEly5knhCewwHIRAgCpAJ91iCd86JS+gmWpF8b4kI9Vc8uQgACbBv+3
n0wMABsJ9EO3bZaap7rjB9k=
=sftI
-----END PGP SIGNATURE-----



More information about the talk mailing list