문제

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?

올바른 솔루션이 없습니다

다른 팁

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

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top