Responses inline...
On Tue, Sep 30, 2008 at 9:21 AM, Weston, Craig (OFT)
<[EMAIL PROTECTED]> wrote:
>
> Rob,
> I tried this on the small test data, a larger data set and it appears to
> make my day. I sincerely appreciate your willingness to help me out.
>
> I do have some questions, mostly so I c
k you.
-Original Message-
From: Rob Wultsch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2008 10:11 AM
To: Weston, Craig (OFT)
Cc: mysql@lists.mysql.com
Subject: Re: Many to many to too many relation.
Luck for you my vpn appears to be screwed up. Here is a stored proc I
whipp
Wow, I do feel very lucky. I am only at the "this is a cursor" part.
I sincerely appreciate your help.
-Original Message-
From: Rob Wultsch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2008 10:11 AM
To: Weston, Craig (OFT)
Cc: mysql@lists.mysql.com
Subject: R
> From: Rob Wultsch [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2008 3:30 AM
> To: Weston, Craig (OFT)
> Cc: mysql@lists.mysql.com
> Subject: Re: Many to many to too many relation.
>
> I tried reading this and it took much brain power to do for free. I
>
his e-mail or its
> attachments. Please notify the sender immediately by reply e-mail and
> delete the e-mail from your system.
>
>
> -Original Message-
>
> From: Rob Wultsch [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 30, 2008 3:30 AM
> To: Weston, Crai
from your system.
-Original Message-
From: Rob Wultsch [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 30, 2008 3:30 AM
To: Weston, Craig (OFT)
Cc: mysql@lists.mysql.com
Subject: Re: Many to many to too many relation.
I tried reading this and it took much brain power to do for free. I
, Craig (OFT)
Cc: mysql@lists.mysql.com
Subject: Re: Many to many to too many relation.
I tried reading this and it took much brain power to do for free. I
suggest breaking this down into the simplest possible example you can.
Ideally have an create table statement, and insert with a small amount
of
I tried reading this and it took much brain power to do for free. I
suggest breaking this down into the simplest possible example you can.
Ideally have an create table statement, and insert with a small amount
of data (as simple as possible), a simple psuedo code query and
example output of what yo
Great! With a little adaption it works! Yes and of course I have to use
another name for groups :) It was just an example. I have slightly different
table settings.
SELECT u.name
FROM user u
JOIN user_role ur ON u.id=ur.user_id AND (ur.role_id=1 OR ur.role_id=2)
JOIN user_group ug ON u.id=ug.user
Rapthor,
Try ...
SELECT u.name
FROM user u
JOIN user_role ur ON u.id=ur.user_id AND (u.id=1 OR u.id=2)
JOIN user_group ug ON u.id=ug.user_id AND (u.id=1 OR u.id=2)
HAVING COUNT( DISTINCT ur.role_id ) = 2
AND COUNT( DISTINCT ug.group_id ) = 2;
BTW you can't name a table 'group'; it's a reserve
I'm not sure if you're a novice to databases in general or just MySQL but if
you aren't quite sure what a join is, I suspect you must be new to
relational databases in general.
In that case, may I recommend that you seriously consider devoting some time
to learn SQL? This is the language used by a
On 21/04/2005 3:36 p.m., Perry Merritt wrote:
Hi, I'm a novice.
Hi Perry,
I've designed a database that supports many to many relationships (actually many to many to many) and I need help creating the query to find my data. I know things like JOINs exist, but don't have a clue how to use them.
An answer won't make much sense if you truly don't have a clue.
W3schools has a good intro on joins.
http://www.google.com/search?hl=en&q=sql+join+syntax&btnG=Google+Search
cheers,
KB
On 4/20/05, Perry Merritt <[EMAIL PROTECTED]> wrote:
> Hi, I'm a novice.
>
> I've designed a database that sup
- Original Message -
From: "Emily Lena Jones" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, October 28, 2004 7:46 PM
Subject: Re: many-to-many query
>
> Quoting Rhino <[EMAIL PROTECTED]>:
>
Quoting Rhino <[EMAIL PROTECTED]>:
> I wasn't sure if you understood the concept of association tables so forgive
> me if I told you things you already knew; I didn't mean to be patronizing.
No problem--you weren't patronizing at all, and I did tell you I was new at
this!
> With respect to you
- Original Message -
From: "Emily Lena Jones" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 28, 2004 4:05 PM
Subject: many-to-many query
> Hi, I'm totally new at this so have no idea whether I'm asking for
something
> easy or quite difficult.
>
> I am working in My
IL PROTECTED]>
Sent: Saturday, August 28, 2004 6:08 PM
Subject: Re: Many to Many: Does this make sense ?
> Okay, hopefully I'm somewhat clearer today. I doubt
> it but the effort is going to be made regardless.
>
> First off, Rhino I read through your last post,
> regardin
f you have definitely abandoned
> it. Maybe we can critique
> that design for you and help you improve it or at
> least avoid the most
> common pitfalls.
>
> Rhino
>
>
>
>
> - Original Message -
> From: "Stuart Felenstein" <[EMAIL PROTECTED]>
As for the RAD tool I'm open to suggestions, but I
think I've read about them all. PHP - MySQL platform.
Does it have to be PHP? If a java RAD is ok I would suggest
http://jdbforms.sourceforge.net/
It does not allow multiple inserts from one page, BUT you can:
1) tack in some html (text area o
From: "Stuart Felenstein" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Stuart Felenstein" <[EMAIL PROTECTED]>
Sent: Friday, August 27, 2004 4:47 PM
Subject: Re: Many to Many: Does this make se
uart Felenstein" <[EMAIL PROTECTED]>
> To: "Rhino" <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>; "Stuart Felenstein"
> <[EMAIL PROTECTED]>
> Sent: Friday, August 27, 2004 3:05 PM
> Subject: Re: Many to
My replies are interspersed below.
Rhino
- Original Message -
From: "Stuart Felenstein" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; "Stuart Felenstein" <[EMAIL PROTECTED]>
issues for many years now.
>
> Rhino
>
> - Original Message -
> From: [EMAIL PROTECTED]
> To: Rhino
> Cc: [EMAIL PROTECTED] ; Stuart Felenstein
> Sent: Friday, August 27, 2004 2:05 PM
> Subject: Re: Many to Many: Does this make sense ?
>
>
s the way we've been handling those issues for
many years now.
Rhino
- Original Message -
From: [EMAIL PROTECTED]
To: Rhino
Cc: [EMAIL PROTECTED] ; Stuart Felenstein
Sent: Friday, August 27, 2004 2:05 PM
Subject: Re: Many to Many: Does this make sense ?
Rhino,
Rhino,
You and I are on the same page. I also never seen a "true many-to-many"
relationship in database design. The closest approximation I have seen is
the 3 table design like you and I have both proposed. It's the only way I
have ever seen to model a many-to-many design, that's why I called
I don't think M2M or 12M make total sense
> to
> > me. I'm not sure about the interim table. A
> query
> > with some joins would net back the same results.
> What
> > I think is it's necessary to the 12M process.
> >
> > Thank you,
> >
My remarks are interspersed below for reasons which will probably be obvious.
Rhino
- Original Message -
From: [EMAIL PROTECTED]
To: Stuart Felenstein
Cc: [EMAIL PROTECTED] ; Peter Brawley ; Rhino
Sent: Friday, August 27, 2004 12:33 PM
Subject: Re: Many to Many: Does this
is
the way it is.
Rhino
- Original Message -
From: "Stuart Felenstein" <[EMAIL PROTECTED]>
To: "Rhino" <[EMAIL PROTECTED]>; "Peter Brawley"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Friday, August 27, 2004 11:47 AM
Subject: Re: Many t
cess.
>
> Thank you,
> Stuart
>
> --- Rhino <[EMAIL PROTECTED]> wrote:
>
> >
> > ----- Original Message -
> > From: "Stuart Felenstein" <[EMAIL PROTECTED]>
> > To: "Peter Brawley"
> > <[EMAIL PROTECTED]>;
&g
ROTECTED]> wrote:
>
> - Original Message -
> From: "Stuart Felenstein" <[EMAIL PROTECTED]>
> To: "Peter Brawley"
> <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>
> Sent: Friday, August 27, 2004 10:06 AM
> Subject: Re: Many to Ma
- Original Message -
From: "Stuart Felenstein" <[EMAIL PROTECTED]>
To: "Peter Brawley" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, August 27, 2004 10:06 AM
Subject: Re: Many to Many: Does this make sense ?
> Thank you for the "
Thank you for the "stop" sign.
As for the RAD tool I'm open to suggestions, but I
think I've read about them all. PHP - MySQL platform.
Stuart
--- Peter Brawley <[EMAIL PROTECTED]>
wrote:
> Stuart,
>
> >I'm using a RAD
> >tool. Meaning it's point and click on fields and
> >tables and the c
Stuart,
>I'm using a RAD
>tool. Meaning it's point and click on fields and
>tables and the code is generated automagically. The
>one problem I've run into is the RAD tool doesn't have
>the auto capabilities to allow multiple insert
>transactions into the same table on one "page". To
>allow 5 tit
but i'm 97% that it
works... ofcource You have to modify the query to match Your DB layout
=d0Mi=
- Original Message -
From: "Matthew Smith" <[EMAIL PROTECTED]>
To: "mysql" <[EMAIL PROTECTED]>
Sent: Thursday, April 18, 2002 8:04 AM
Subject: Re: [MANY
Hi Robbie
Reading what I wrote wasn't very clear to me either ;-)
> How does song_x_artist reference the other databases? Is there a way to set
> up a field to always be a reference to another table?
I think you may be talking foreign keys here - something yet to come in
MySQL AFAIK.
>
>
> ...So the table song_x_artist contains references to all artists in a
> song and vice-versa. (Field names correspond between tables.)
How does song_x_artist reference the other databases? Is there a way to set
up a field to always be a reference to another table?
I am not quite sure what you
This is the classic case for a junction table (aka bridge table, associative
table). It sits between Artists and Songs; let's call it PlaysOn.
Artists:
ArtistID: autoincrement
ArtistName: varchar
DOB: date
etc.
Songs:
SongID: autoincrement
SongName: varchar
Duration: in seconds, say
etc.
PlaysO
Hi Robbie, all
I have lots of things that need many to many - the way that I do it is this:
create table artists (
a_ser
int unsigned not null primary key auto_increment,
artist_name varchar(64),
other stuff...
);
create table songs (
s_ser int unsigned not null primary key auto_increment,
These two statements say the same thing. They shouldn't cause a problem but
the probably don't do what you want.
Try using the first table multiple times and use an alias.
Don't have my book handy but it seems to me that :
Select table1.*, table2.* from table1 as t1, table1 as t11, table 2 as t
39 matches
Mail list logo