Creative and energetic Software Engineer with 3 years of experience full of challenges, difficulties, and achievements. Love learning new things and teaching others and developing software.
Yes! In certain instances, I chosen to simplify the categories table by storing only the id and name of the category. Meanwhile, the sub_categories table includes additional details such as id, name, parent_id, description, icon, and a flag to signal anything new or updated in the UI. Additionally, I introduced a group_id for cases where subcategories are logically grouped under a common title.
In other scenarios, I have followed your recommended approach, especially when a client requested categories and subcategories with unlimited depth. Your approach proved to be the most suitable for handling such cases of dynamic hierarchy.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes! In certain instances, I chosen to simplify the
categoriestable by storing only theidandnameof the category. Meanwhile, thesub_categoriestable includes additional details such asid,name,parent_id,description,icon, and aflagto signal anything new or updated in the UI. Additionally, I introduced agroup_idfor cases where subcategories are logically grouped under a common title.In other scenarios, I have followed your recommended approach, especially when a client requested categories and subcategories with unlimited depth. Your approach proved to be the most suitable for handling such cases of dynamic hierarchy.