I am working on a feature for categorizing things. All items can have 0 or n children.
There will also be a need for 2 or more unrelated parents to have the same child..but maybe that won’t be too necessary.
How do people create a schema for this? Is it a matter of having this sort of table columns:
category_id | category_name | parent_id | child_id
Or is there some way of doing this that is more elegant and flexible?
Thanks!!
If you’re speaking of tagging items, then you’d normally have an
articlestable, ataxonomy_termstable, and then a join table likearticles_taxonomy_terms, which articles can have any number of related terms (tags).