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)
 Category, SubCategory, SubSubCat, & Product

Author  Topic 

Johnhamman
Starting Member

37 Posts

Posted - 2002-06-29 : 18:28:06
Hi all, I have to develop a database for a athletic sportsware company and im looking at the most effeciant way of doing this for speed in querys. the way the categorys are set up is as below
Category[MLB]
-Subcat [atlanta braves]
-SubSubCat [T-shirt]
- Product[tshirt 'a']
- Product[tshirt 'b']
-SubSubCat [Hats]
- Product[hat'23']
-SubCat [Florida Marlins]
-subsubcat [t-shirts]
-product[tshirt 'c']
Category[NBA]
- subcat [chicago bulls]
- etc,etc.........


On the page that list products i would like to do something like this.

MLB | Atlanta Braves | tshirts(link) hats(link) etc...
logo| | Random Altanta braves product or special
--------------------------------------------------------------
| Florida Marlins| tshirts(links) hats(link)
| | random fl marlins product or special.
--------------------------------------------------------------
| next team | blah bhal bhaksdf;a lsd



On top of that i would like to limit how many items are shown
on a page and have paging. I will be doing this in asp.net.
The problem im having is the database dasign and query for
something like this. Can anyone out there help?



Edited by - johnhamman on 06/29/2002 18:28:48

AjarnMark
SQL Slashing Gunting Master

3246 Posts

Posted - 2002-07-01 : 14:26:38
You might find Robvolk's article on Hierarchies and Trees helpful.

Go to Top of Page

Johnhamman
Starting Member

37 Posts

Posted - 2002-07-01 : 23:19:58
I did find them somewhat helpful but I also got lost in the concept. IM loosing my mind though. I need a break.
john

Go to Top of Page

byrmol
Shed Building SQL Farmer

1591 Posts

Posted - 2002-07-01 : 23:44:47
John,

Maybe if you named things a different way it will make it easier...

Based on the Information you have given...

Category becomes Sport
SubCat becomes Team
SubSubCat becomes ProductType
Product stays as Product

Predicates:
There are many Sports.
Each Sport has many Teams
A Team can have many ProductTypes
A Team-ProductType has many Products...

HTH

DavidM

"SQL-3 is an abomination.."
Go to Top of Page
   

- Advertisement -