On 5/5/09 4:42 PM, "Richard S. Crawford" <rscrawf...@mossroot.com> wrote:

> On Tue, May 5, 2009 at 1:34 PM, PJ <af.gour...@videotron.ca> 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...

don't forget to consider the handling of anthologies :-)

>> Anyone for tea?

yes please, i'd love some.

> 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.

i have a db with 10s of millions of artists, disks, songs etc. i've tried it
both ways. and after 5 years working with it i still can't make up my mind
which way i prefer it. i keep finding pros and cons to each approach that
differ depending on what functionality i'm programming. i will never have a
simple answer.

so i can't help answer the original question other than to say that, for me,
personally, in my opinion, i don't accept the dogma that normal forms are
always good for you. they might be. it depends. it's like being dogmatic
about specific foods without taking the overall diet and lifestyle into
account. despite the simple dogma some may espouse, whether or not a big mac
with fries is bad for you depends on many factors.

in any case, it's amazing what you can do these days with one huge table and
some well chosen indexes. and it's amazing how mind bending it can get when
joining 5 data tables using 3 join tables.

good luck, phil.

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

Reply via email to