Support the ongoing development of Laravel.io →
Database Testing

Hello everyone!

I have a relational model of three tables. And all with an N-N relationship. To simplify the number of rows wanted to unify one for IDs. For example:

Table 1: Color #1 - Red #2 - Blue

Table 2: Model Car #1 - Car 1 #2 - Car 2

Table 3: Brands #1 - Brand 1 #2 - Brand 2

And I wanted to store the relationship in this way:

Table for: #ID Brand Model Color #1 1 1 1,2 #2 2 2 1,3,5 ...

It would be possible to make this relationship without losing the link with the color table?

Greetings!

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.