Question

I have a lot of products with the same properties. I mean all products need the same information to be stored in database. The only difference is that some products are spare parts for other ones.

I'm thinking about making a single table with an ID for ever product. Also a ParentID field to store it's parent id. I'm thinking if this way is better? or having two tabled and join them?

Which solution has a better performance?

No correct solution

OTHER TIPS

Try using nested set, here is a good explanation :)

http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top