View Single Post

   
  #8 (permalink)  
Old 02-28-2008, 08:17 AM
Stefano Bragaglia
 
Posts: n/a
Default Re: [Newby] help on a statement with both GROUP_CONCAT and JOIN clauses


Jerry,

thank you again for your kindness! I hope not to bother you with my
questions

Yes, what I proposed here is an academic exercise... and I hope it will grow
into a working project to pass the exam...

> OK, glossary contains a name. And synonims (sic) contains synonyms of
> name being surname and nickname.
>
> But no place have you indicated that these two come from the same row.


What do you mean? Referring to the following bit of code, I thought that the
last line is doing the trick... I mean, doesn't the FOREIGN KEY clause
actually bind each synonim with the same correct row in table "glossary"?
If I'm still wrong, can you please show me how to indicate that objects
comes from the same row?

CREATE TABLE synonims (
name VARCHAR(50) NOT NULL,
entry VARCHAR(50) NOT NULL,
option VARCHAR(50) NOT NULL,
PRIMARY KEY (name, entry, option),
FOREIGN KEY (name, entry) REFERENCES glossary (name, entry));

I know I'm looking like the guy who looks at the finger when you point out
something, but I really don't understand where is my error... Are you
suggesting me to use a simple unique table to do the whole job? If so,
yes... it could be easier to manage, but I also have to develop a little
WAMP solution and I'm planning to handle things (synonims, for example) as
list of strings and not as a single string to edit...

Still thank you, forgive my dumbness,
Stefano Bragaglia


Reply With Quote