Re: How to deal with identical fields in db

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 5, 2009 at 1:34 PM, PJ <af.gourmet@xxxxxxxxxxxx> wrote:
> I'm coming up with a bit of a quandry: how to enter and retrieve an
> identical book title with different authors.
> It is rather unbelievable what contortions one finds as authors :-(
> like editors, associations and then the unknowns and anon y mouses.
> I suppose one has to get really creative...
> Anyone for tea?

What I've done for this sort of project in the past was create
separate tables for authors, books, and author relationships (e.g.,
author, translator, editor), then linking tables for each of those.
You seriously want to do some normalization on this task; otherwise,
you end up with a giant table of books, with multiple rows duplicating
the title of the book, leading to a huge "books" table, and nobody
wants that.

-- 
Richard S. Crawford (rscrawford@xxxxxxxxxxxx)
http://www.mossroot.com
Publisher and Editor in Chief, Daikaijuzine (http://www.daikaijuzine.com)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux