List:General Discussion« Previous MessageNext Message »
From:Jennifer Goodie Date:January 15 2003 12:30am
Subject:RE: how to have varying number of fields?
View as plain text  
Sounds a lot like the grape blends in different wines question posted last
week. :)

You'll need a cross ref table with a one to many relationship and possibly a
field that says what the person did.

like
| SongID | ComposerID  | Role   |
+--------+-------------+--------+
|    1   |       1     | Poem   |
|    1   |       2     | Music  |
|    1   |       3     | Poem   |
|    1   |       1     | Lyrics |


Just a suggestion, You might want more fields or different names.

Search on last week's answers, I believe the thread was called "Database
Design" or something like that.  I'm sure there's not a lot of posts that
mention grapes and wines on the list.

-----Original Message-----
From: David T-G [mailto:davidtg-mysql@stripped]
Sent: Tuesday, January 14, 2003 3:10 PM
To: mysql users
Subject: how to have varying number of fields?


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

Hi, all --

The Subject: may be a bit misleading, so let me start from scratch.  I'm
creating a sheet music catalog for our church, and one of the things I'll
want to track is who wrote it.  [Actually, we have music composers and
arrangers and poet authors as well as particular biblical sources, but I
think that the first three can be classed together.]  Of course, Martin
Broones does a lot of the music, and Avelyn Kerr a lot, and I wouldn't
want to repeat that, so of course I need a 'composers' table (yeah, it
should probably be a more rounded name, but so what :-)

The problem comes when I have a piece of music whose words or music are
by two people, such as "Music by Martin Broones.  Poem by John and Jane
Doe." -- when I already have entries for John and Jane on their own.

Do I just bite the bullet and make another record for "John and Jane",
filling in their names and dates and styles and other 'composers' fields
in duplicate, or is there a way to have my 'pieces' table, listing all of
the pieces and their attributes, somehow point to *both* of those
composers in the foreign 'composer' field?


TIA & HAND

Good grief; even Dan's qsecretary is better than this mysql query thing!
:-D
- --
David T-G                      * There is too much animal courage in
(play) davidtg@stripped * society and not sufficient moral courage.
(work) davidtgwork@stripped  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE+JJi7Gb7uCXufRwARAqkaAKCquKk01B5NeAngFUXir6bIMJAPkgCeI0zk
YnJGqiKl6+i36SXa9IwQvCU=
=bxf7
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <mysql-thread129946@stripped>
To unsubscribe, e-mail
<mysql-unsubscribe-goodie=apolloi.com@stripped>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Thread
how to have varying number of fields?David T-G15 Jan
  • RE: how to have varying number of fields?Jennifer Goodie15 Jan
    • ANSWERED: Re: how to have varying number of fields?David T-G15 Jan
  • RE: how to have varying number of fields?Cal Evans15 Jan