April 22nd, 2013, 02:56 PM
Join Date: Mar 2013
Time spent in forums: 1 h 59 m 54 sec
Reputation Power: 0
One to many Relationships - HELP!
Let me prefix this by saying that I'm retired, 72 years old, ex-Computer Engineer, programmed in VB and Delphi, but NEVER worked with one to many relationships, because I never needed to for the work I did.
Now I'm trying to get my head around One to many Relationships, but going quietly crazy. I'm trying to create these Tables at Runtime in Delphi. I've done this lots of times, but never had to set up relationships, but if I have the SQL or the Table Structure, I can program it.
I've tried using MySQL Workbench. A great Tool IF you know what you are trying to do (and I don't!)
Here are my Tables - it's pretty obvious what I'm trying to do, can someone PLEASE give me the SQL to create this along with the relationships? save me from bashing my head against a brick wall. (The Workbench complete diagram would also do. I think)
PRIMARY KEY iType (TypeID),
UNIQUE INDEX iName (Name)
Thanks in advance