I may not be able to explain this as clearly as I'd like to, but here goes my best attempt . . .
I am building a DB of businesses and grouping them by type of business. Some businesses may fall into more than one category, for example a car dealer would be included under category listings for 101 (new cars), 102 (used cars), 103 (auto service), and 104 (auto parts).
Would it be better to store the categories in which the business is included in the business_detail table as an array like so:
| BZ_ID | business_name | business_address | business_category |
---------------------------------------------------------------------------
| 01234 |Bob's Dealership | 123 some street | 101, 102, 103, 104 |
Then a table that would list the category ID and its name.
--- OR ---
create a separate table for category_members something like below, and leave the category out of the business_detail table altogether.
| CM_ID | cat_number | BZ_ID |
---------------------------------------------------
| (PK auto_inc) | 101 | 01234 |
---------------------------------------------------
| (PK auto_inc) | 102 | 01234 |
---------------------------------------------------
| (PK auto_inc) | 103 | 01234 |
---------------------------------------------------
| (PK auto_inc) | 104 | 01234 |
Or perhaps something completely different that I haven't even thought of?