Okay, so I see 3 tables right off the bat:
1.) business
2.) category
3.) biz_to_cat
The business table would be filled with each business's information like name, address, contact info, etc. The category table would be filled with the name of categories. Now, to deal with subcategories, we'd have a "parentID" field where the ID of the category that the subcategory is under is that value. For example:
- Accountancy
-- Some Sub Category
For that example, we'd have the following:
id | parentID | title
1 | 0 | Accountancy
2 | 1 | Some Sub Category
So each top-level category will have a parentID of "0", and each subcategory will have a parentID of the value of the id of the parent's category.
The third table is a simple relationship table that links the business table to the category table. This isn't entirely necessary; however, it can make things easier to look-up and make things faster eventually. Essentially the table is nothing more than 3 columns, each with numbers in them:
id | bizID | catID
1 | 1 | 1
2 | 9 | 2
So then the business with id "1" would be in the Accountancy category (but not in the sub-categories). The business with id "9" would be in the sub-category "Some Sub Category" of the Accountancy category, as well as it would be a part of the Accountancy category.
Hope that helps.