Re: forming foreign keys

2003-06-12 Thread Nils Valentin
Hi Victoria, yes... we come closer now. I can already spot my 2nd mistake which I made. ;-) I was believing that the index setup in table child for the foreign key must setup as primary key (talking about id1 and id2). That would explain the error messages to me. That leaves only a few questio

Re: forming foreign keys

2003-06-12 Thread Victoria Reznichenko
"Nils Valentin" <[EMAIL PROTECTED]> wrote: > > Thank you for the reply. I understand now that it must be the first part of > the primary index in both related tables. > > But what I still dont understand is the following: > > How do I create several foreign keys in a single table (f.e a link ta

Re: forming foreign keys

2003-06-11 Thread Nils Valentin
Hi Victoria, Thank you for the reply. I understand now that it must be the first part of the primary index in both related tables. But what I still dont understand is the following: How do I create several foreign keys in a single table (f.e a link table) which relates f.e to 10 other tables ?

Re: forming foreign keys

2003-06-11 Thread Nils Valentin
Hi Victoria, I thought so, but also if I try somthing similar like: ALTER TABLE db ADD FOREIGN KEY (Host) REFERENCES user (Host); I get the same error. BTW: Can I change the order of the keys ? Best regards Nils Valentin 2003年 6月 11日 水曜日 17:17、Victoria Reznichenko さんは書きました: > "Nils Valenti

Re: forming foreign keys

2003-06-11 Thread Victoria Reznichenko
"Nils Valentin" <[EMAIL PROTECTED]> wrote: > > I believe that the User column is indexed (please see below): > > show index from user; > +---++--+--+-+---+-+--++--++-+ > | Table | Non_uniqu

Re: forming foreign keys

2003-06-10 Thread Nils Valentin
Hi Victoria, Heikki, List members From another thread "Re: Foreign Key in Innodb and Index Usages" I found this: >Both tables have to be InnoDB type and there must be >an index where the foreign key and the referenced key >are listed as the FIRST columns. an tried to do it in another way f.e m

Re: forming foreign keys

2003-06-10 Thread Nils Valentin
Hi Victoria, I believe that the User column is indexed (please see below): show index from user; +---++--+--+-+---+-+--++--++-+ | Table | Non_unique | Key_name | Seq_in_index | Column_name

Re: forming foreign keys

2003-06-10 Thread Nils Valentin
Hi Victoria, 2003年 6月 10日 火曜日 19:16、Victoria Reznichenko さんは書きました: > "Nils Valentin" <[EMAIL PROTECTED]> wrote: > > I try to create foreign keys in a innodb database. I read through some > > threats and the manual, and several online resources, but somehow I am > > missing something. > > > > What

Re: forming foreign keys

2003-06-10 Thread Victoria Reznichenko
"Nils Valentin" <[EMAIL PROTECTED]> wrote: > > I try to create foreign keys in a innodb database. I read through some threats > and the manual, and several online resources, but somehow I am missing > something. > > What I try to do is recreate the keys and their functions of the mysql > datab

forming foreign keys

2003-06-08 Thread Nils Valentin
Hello Mysql list, I try to create foreign keys in a innodb database. I read through some threats and the manual, and several online resources, but somehow I am missing something. What I try to do is recreate the keys and their functions of the mysql database (privilege database) as a innodb d