Quantcast
Channel: MySQL Forums - MySQL Workbench
Viewing all articles
Browse latest Browse all 3739

New many-to-many only creates one foreign key (2 replies)

$
0
0
Well...sort of.

I'm following the NetBeans e-commerce tutorial and there are customer_order and product tables.

I can create the many-to-many relationship between them just fine, but in the new table's list of indexes, it shows one PRIMARY and one FK.

But if I edit this table, the Foreign Keys tab shows both FK's, but one has an "index" of PRIMARY and the other has an "index" that's the same as the name of the FK.

What does it mean for a foreign key to have an index of (the FK name) as opposed to an index of "primary"?

Also, when I delete and recreate this relationship, I still get one PRIMARY and one FK in the list of indexes, but in the Foreign Key tab, the "missing" FK now shows an "index" of null (nothing shown).

Any ideas why I see one primary and one fk in my new table whereas the tut shows one primary and two fk's in the new table?

Viewing all articles
Browse latest Browse all 3739

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>