PDA

View Full Version : Multiple Tier System



technorocker
05-18-2007, 11:41 AM
Hi,

I'm new here on the forums, so hello everyone!! :)

Ok on to my problem. I have been asked to develop a directory website which will have a list of businesses. I have created a 3 tier system before (Directory > Sub Category > Business) however, I now need to be able to create multiple levels in the directory.

So for instance it could be: Directory > Plumbers > Business Name OR Directory > East Anglia > Norfolk > DJ's > Mobile DJ's

I have been given advice on this by creating two tables. One for the Categories and one for the listings. See below:

Catgeories
ID | ParentID | Name


Listings
ID | Name | Business ect.....


I'm now really lost with this and my brain is now mashed up and then bin fried.

Can anyone shed some light on this please? I'll give you a cookie :p


Thanks in advance,
Adam

duncan22
06-08-2007, 03:30 PM
Let me try to understand what you are doing here: you need to create a multi-tier system that will allow people to navigate easily from business to business based on their feedback as they search, right?

Sounds to me like before the user even gets to searching, they should specify how they wish to find the business: either by type of business, narrowing it down to the name, or by area, such a "Directory > East Anglia > Norfolk > DJ's > Mobile DJ's" (isn't norfolk in virginia? i think i've driven through there). Once the user determines if he/she wishes to do by type or by location, you can then easily set up what information is fed to them. If you set up a relational database that connects each business to its information it should then be pretty simple by enabling and filling combo boxes with data as the user puts in selections.

Database: set up a main table named "tblBusinesses" or something and have two fields: "fldBusinessID" and "fldBusinessName" with fldBusinessID being an autonumber (Access) or int with incremental properties (sql server 05). From there, create whatever tables you need with the locations, types, etc. and then tie them all together back to fldBusinessID.

Website: once the user tells you how they want to find the business, navigate them to a different page accordingly. From there, have a series of combo boxes that ask for business type (plumbing) or area (norfolk) that goes down to help them narrow their search. You can easily, using ASP and postbacks, get them to navigate to their choice quickly.

Hope this helps.

Matt