[Date Prev][Date
Next][Thread Prev][Thread Next][Date
Index][Thread Index]
Re: UKHA Classified update - SQL Help!
BUTLER, Tony, FM writes:
> If you point me to the example you're working from, I'll give it a go.
>
I don't even have access to SQL Server here, but I think I just went into
books online and searched for 'Expand Hierarchy' or 'Expanding Hierarchies'
or similar.
> I presume it's a 1:many and 1:1 relationship respectively between
> tblProductsType and tblProducts, and tblProducts and tblStatus
> Also, am I right in thinking there's 1:many between tblProductType and
> itself, which could drill down infinitely?
ProductType can have many Products, Product belongs to single ProductType.
Product has a single Status, Status can apply to several Products
ProductType can drill down infinitely according to the database design, but
for practical purposes I assume maximum of 10 levels in the ASP code so I
suggest the same would be fine for this function.
> Or do you practically see a limit of 2 or 3 deep maybe?
> How do you identify a top level parent?
ParentProductTypeID=ProductTypeID or
> ParentProductTypeID= some special value (eg -1) ?
>
Top level ProductType has a ParentProductType of 0, this is a quick and
dirty solution and you may well therefore correctly deduce that I am not
forcing the relationships at database level (after all this is not *yet* a
mission critical application ;-)). However the ASP code for maintaining
ProductTypes does force an existing ProductType to be selected as the
ParentProductType.
> If you were extracting as XML of course, it would be a simple matter
to
> xform it with XSLT and generate the counts for you.....
>
XML is still something I have not really looked at. The problem as ever is
time, but also I couldn't see what it gave me as an advantage over
SQL/ASP/CSS in relation to the sort of sites I do. In my very simplified
view of XML (and I know that there are plenty here who will tell me I'm
completely missing the point) it allows 'database like' functionality on
the client, it 'divideds format and content' and it allows information to
be shared easily with others who have the same 'schema'. I achieve the
first two of these functions with my existing toolset and the third is
really of no interest to me with the sorts of sites I design. I did buy a
book on it, but I'm afraid I gave up after a few chapters because I kept on
saying to myself 'I do this already'. It was a bit like when I tried to
learn snowboarding, I am a good skier but wanted to have a go on a board.
After a few days of punishing wipeouts I got to the stage where I could get
down the easier slopes in a fairly controlled manner. But to do that I had
missed out on skiing in powder, through trees, off cliffs and all the usual
stuff I do on two planks. I would still love to be able to come down from
the top of a mountain on a snowboard, but with two weeks of skiing a year,
I can't afford the time to get to that level. Lots of people seem to think
XML is great, but the learning curve for me to get to a point where it is
useful seems to be too great and I don't have the time.
Regards
Graham
Home |
Main Index |
Thread Index
|