List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:March 27 2006 3:29pm
Subject:Re: Complicated select query
View as plain text  
Barry,
> Hello Everyone!
>
> Probably somone can help me out.
>
> I have 2 databases and it looks like:
(Wayne Ratliff is dead but his mistake lives on :-) ). You mean tables, 
right?
> db1 Project 1
>   db2 Subproject 1
>   db2 Subproject 2
> db1 Project 2
>   db2 Subproject 1
> db1 Project 3
>   db2 Subproject 1
>   db2 Subproject 2
>   db2 Subproject 3
>
> What kind of a query would give me the first Subproject out of dv2 of 
> each Project in db1?
A hierarchical query, ie a query which traverses the data as a graph. 
They're doable in MySQL, eg see 
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html. A 
simple nodes-and-edges (Edge List) model should do fine for your problem.

PB
>


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.1/292 - Release Date: 3/24/2006

Thread
Complicated select queryBarry27 Mar
  • Re: Complicated select queryGabriel PREDA27 Mar
    • Re: Complicated select queryBarry28 Mar
      • Re: Complicated select queryBarry28 Mar
      • Re: Complicated select queryPure Web Solution28 Mar
  • Re: Complicated select queryPeter Brawley27 Mar