How do I create my tables so I can capitalize on CakePHP ORM. The case being I have a table with many foreign keys.
- type [sports car, sedan, pickup, suv, motocycle, etc]
- color [lots of different colored names]
- brand [ brand names]
- model [model names]
The type, color, brand, model are going to be foreign keys. So below is some text on Database Convention for CakePHP
Join tables, used in BelongsToMany relationships between models, should be named after the model tables they will join or the bake command won’t work, arranged in alphabetical order (
tags_articles). If you need to add additional columns on the junction table you should create a separate entity/table class for that table.
In my sample above, the vehicles table the junction table? So I should name this table