Relationships Question

2004-05-25 Thread Richard Lewis
Dear List,

I am working on a database of electronic compositions (and installations 
etc.) and currently have, amongst others, the following tables:

ARTIST(_id_,...)
SCORE(_id_,_artist_id_,...)
COMPOSITIONS(_id_,_score_id_,...)
INSTALLATIONS(_id_,_score_id_,...)
PERFORMANCES(_id_,???)

The PERFORMANCES table lists dates and locations (etc.) of 
performances of COMPOSITIONS and INSTALLATIONS in the database. 
My current entity relationship diagram gives a one-to-many relationship 
between COMPOSITIONS and PERFORMANCES and between 
INSTALLATIONS and PERFORMANCES. However, this would involve 
PERFORMANCES having two foriegn keys (composition_id and 
installation_id) one of which would be redundant. Whats the best way to 
design this relationship?

Cheers,
Richard


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: Relationships Question

2004-05-25 Thread Laercio Xisto Braga Cavalcanti
Hi Richard,


Can you make a relationship between COMPOSITIONS and INSTALATIONS? If so,
then you make a relationship between COMPSOTIONS_ONSTALATIONS and
PERFORMANCES.

Laercio. 

-Original Message-
From: Richard Lewis [mailto:[EMAIL PROTECTED] On Behalf Of Richard Lewis
Sent: terça-feira, 25 de maio de 2004 09:58
To: [EMAIL PROTECTED]
Subject: Relationships Question

Dear List,

I am working on a database of electronic compositions (and installations
etc.) and currently have, amongst others, the following tables:

ARTIST(_id_,...)
SCORE(_id_,_artist_id_,...)
COMPOSITIONS(_id_,_score_id_,...)
INSTALLATIONS(_id_,_score_id_,...)
PERFORMANCES(_id_,???)

The PERFORMANCES table lists dates and locations (etc.) of performances of
COMPOSITIONS and INSTALLATIONS in the database. 
My current entity relationship diagram gives a one-to-many relationship
between COMPOSITIONS and PERFORMANCES and between INSTALLATIONS and
PERFORMANCES. However, this would involve PERFORMANCES having two foriegn
keys (composition_id and
installation_id) one of which would be redundant. Whats the best way to
design this relationship?

Cheers,
Richard


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]