Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Recursive Joins and 3 level deep categorization

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-04-08 : 11:54:30
Andy writes "I'm working on an application to organization businesses and websites into categories. I'd like to have the ability to have 3 levels of categorization with the ability for something to show up in more than one catergory or level.

I accomplished this is the past using the following method

tbl_cat1:
cat1_Id
cat1_Name
'
tbl_cat2:
cat2_Id
cat1_id
cat2_name
'
tbl_cat3:
cat3_Id
cat2_id
cat3_name
'
tbl_cat4:
cat3_Id
orgID
'
tbl_orgs:
orgID
orgName
orgURL

I then used recursive joins to join the data together so that it would be displayed like this,

Main Category (cat1_name)
-> Minor Category (cat2_name)
---> Sub Category (cat3_name)
----->Listing (orgName)

however this turned out to be an extremely slow application due to the multi level join. What other options do I have to accomplish this same type of thing?

I'm using MYSQL on Windows 2000 no service pack right now, however I plan on getting SQL 2000 soon."
   

- Advertisement -