On Thu, 2002-12-05 at 14:42, Beauford.2003 wrote:
Adolfo,
Thanks for the info, but can you elaborate on it, 'cause basically I am just
not getting the concept. No way no how can I get these joins to work.
mysql describe songs; (this contains an ID field and the title of the song
and the
title for song ID # 1
above).
Sorry if this is long, I just wanted to make sure there is enough info.
TIA
Beauford
- Original Message -
From: Adolfo Bello [EMAIL PROTECTED]
To: 'Beauford.2003' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 02, 2002 7:33 AM
Subject: RE: Table
on the number
of albums a song can belong to.
If you know the id of a song all you have to do is
Adolfo
-Original Message-
From: Beauford.2003 [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 05, 2002 3:42 PM
To: Adolfo Bello
Cc: [EMAIL PROTECTED]
Subject: Re: Table setup question
PROTECTED]
To: 'Beauford.2003' [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, December 04, 2002 4:28 PM
Subject: RE: Table setup question
Let's assume you want the entire albums list which the song
Day and Night by Billie Holiday is in.
SELECT t1.title,t1.artist,t3.name FROM sings t1
]
To: Beauford.2003 [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 02, 2002 10:41 AM
Subject: Re: Table setup question
Beauford,
[please reply to the list - there are always others 'lurking' who will
learn
from the discussion (and use of the archives is a wonderful dream...)]
You
: Tuesday, December 03, 2002 7:56 AM
Subject: Re: Table setup question
Beauford,
OK, I get it now. I thought there would need to be duplication in the
AlbumSonglist DB.
=indeed, the process of 'normalisation' (as mentioned earlier) helps to
ascertain when and where 'duplication
Hi Beauford,
You are on the right track. Yes you should remove the songs to a separate
table. If you merely duplicate the first example (below) in two tables you
have created a one-to-many relationship between the Album table and the
Songs table - one album has many songs on it. Your query code
Try something like
CREATE TABLE album( ida int primary key , title varchar(n) not null ) ;
CREATE TABLE songs( ids intprimary key, song varchar(m) not null ) ;
CREATE TABLE albumsongs(
ida int not null,
ids int not null,
primary key(ida,ids),
foreign key(ida)
[EMAIL PROTECTED];
Sent: Monday, December 02, 2002 4:32 AM
Subject: Re: Table setup question
Hi Beauford,
You are on the right track. Yes you should remove the songs to a
separate
table. If you merely duplicate the first example (below) in two tables
you
have created a one-to-many
-
From: DL Neil [EMAIL PROTECTED]
To: Beauford.2003 [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, December 02, 2002 10:41 AM
Subject: Re: Table setup question
Beauford,
[please reply to the list - there are always others 'lurking' who will
learn
from the discussion (and use of the archives
The other difference is that it works (BTW, a huge benefit)
Adolfo
-Original Message-
From: Beauford.2003 [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 02, 2002 11:24 AM
To: DL Neil; [EMAIL PROTECTED]
Subject: Re: Table setup question
DL,
OK, I get it now. I thought
11 matches
Mail list logo