# Setting up a category taxonomy with proper relations

**URL:** <https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884>\
**Category:** Ask for Help\
**Created:** [October 10, 2023, 7:37pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884 "2023-10-10T19:37:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ahmad\_Taleb](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Ahmad\_Taleb](https://community.glideapps.com/u/Ahmad_Taleb)\
**Post date:** [October 10, 2023, 7:37pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884/1 "2023-10-10T19:37:17Z")

</div>

Hi all,

I’m attempting to setup a 2 level taxonomy for services being displayed within my app with a table for each level:

Category: Home improvement  
Subcategory: Flooring

I want to make sure I’m properly associating the taxonomy to the actual service pro.  
Ex:  
Contractor A \< Flooring \< Home Improvement

I’m a bit lost on the proper way of relating the service pro to the taxonomy given that there will be many other pros using the same tags.

Should this be just a simple many to many relation?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 10, 2023, 7:42pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884/2 "2023-10-10T19:42:58Z")

</div>

Depends on how your data is set up, but if you have rows with both a category and a subcategory, you can use a template column to join the two together and then use that for a relation to your pros.

---

<div class="post-metadata">

**Author:** ![Ahmad\_Taleb](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Ahmad\_Taleb](https://community.glideapps.com/u/Ahmad_Taleb)\
**Post date:** [October 10, 2023, 8:48pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884/3 "2023-10-10T20:48:01Z")

</div>

Thank you for the quick response Jeff!

I split category and subcategory into two separate tables as I eventually want to add additional tags to the subcategory for navigation and discovery purposes. So maybe I need three tables?

In my example I would have “…wood flooring, tile, etc.”

What I’m not certain of is which table to relate it to since there’s a hierarchy to the taxonomy.

So do I relate to the lowest level and then lookup my way to the top?

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 10, 2023, 9:02pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884/4 "2023-10-10T21:02:20Z")

</div>

The way I would probably do it is to have a single column Category table with just a list of categories.

`Home Improvement`

Then have a subcategory table that lists subcategory in one column, as well as it’s associated category in another column.

`Home Improvement | Flooring`

I’m assuming you have a third Pros table that has a category column and a subcategory column along with the pro name

`Home Improvement | Flooring | Contractor A`

In the Category table you can create a relation linking the category name to the category name in the Subcategory table.

In both the Subcategory table and the Pro tables, you can create a template column that joins the Category and Subcategory columns together to end up with something like this.

`Home Improvement-Flooring`

Using the template column in the Subcategory table, you can create a relation linking the template column to the template column in the Pros table.

If I’m way off, then you’ll need to provide more details and screenshots describing your data structure and what exactly you are trying to do.

---

<div class="post-metadata">

**Author:** ![Ahmad\_Taleb](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Ahmad\_Taleb](https://community.glideapps.com/u/Ahmad_Taleb)\
**Post date:** [October 10, 2023, 9:46pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884/5 "2023-10-10T21:46:31Z")

</div>

This is great help, thank you Jeff!

I like the use of the template columns, I’ve been struggling to figure out how to display the association between Cat \> Subcat so this is super helpful.

Thank you!!!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [October 17, 2023, 9:47pm UTC](https://community.glideapps.com/t/setting-up-a-category-taxonomy-with-proper-relations/66884/6 "2023-10-17T21:47:16Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
