As you have stated above, you only need to create a link table for many-to-many relationships. If your table is joining to eight other tables and they are one-to-one or many-to-one relationships, then the table will simply have eight foreign keys.
'Link' tables should not be that common, it should often be a full entity with other attributes (other than the two foreign keys) so becomes part of many-to-one and one-to-many relationship with the other two tables. In the unlikely event you really have a schema that requires eight link tables off one table, you should perhaps revisit your design - I work with schemas that have tens of thousands of tables/views and cannot think of a true 'link' table amongst them. HTH GreyCells On Apr 3, 3:18 am, "uk_maul" <[EMAIL PROTECTED]> wrote: > Here is an example of what I was trying to ask: > > many-to-many join tables should be named: > alphabetically_first_table_plural_alphabetically_second_table_plural > ie: tags_users > > So if my table is joining to 8 other tables, with the 8 foreign keys, > how do I get the table name? Will it just be the first fk join table > that I will put in the name and ignore the others? > > Thanks > > On Apr 2, 7:21 pm, "uk_maul" <[EMAIL PROTECTED]> wrote: > > > Hi > > > I am new to CakePHP and need some help with the Cake database naming > > conventions. Our ERD has over a 100 tables (its almost fully > > normalized). Most tables have one or two foreign key relationships > > with other tables, so we followed the Cake conventions fine for those > > and named all the tables in plural and with underscores between the > > related tables. There are a few tables however that have as many as 6 > > or 8 foreign keys. I would like to know how to follow the Cake naming > > conventions for those tables and how can we set up the relationships > > for those tables in the models and how it will impact the automagic > > database functions that depend on the naming conventions. > > > Thanks in advance for help with this. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---