April 14, 2005 at 12:42 pm
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/fBROUARD/recursivequeriesinsql1999andsqlserver2005.asp
April 25, 2005 at 1:48 am
Outstanding ! This should be compulsory reading for every 'procedural' minded programmer who thinks 'SELECT orderid FROM customers' is as far as SQL goes ! And don't get me started on 'OO solves data complexity' - Thanks for the article Anthony.
April 25, 2005 at 4:13 am
April 25, 2005 at 5:47 am
This is probably the most worthwhile article I have read on this forum. Does anyone know if this author's books are available in English?
April 25, 2005 at 8:08 am
Great Article,
Thanks a bunch to the author.
April 25, 2005 at 8:16 am
Congratulations for the good Job!
Thanks,
* Noel
April 25, 2005 at 8:18 am
Nice article with good examples.
Mercy
April 26, 2005 at 10:48 am
Hi, Joe...
I must say that you are my mentor in SQL. You see in France we have some good professors, but they are not as good as I would like to apply SQL in real life !
So this article, and some more I will write is dedicated to all those that are involved in good SQL, in wich, I simply think, you are the boss...
Nice to meet you one day.
April 26, 2005 at 10:54 am
Unfortunatelly, no books I write are available in English. But I am shure thtat you will find in Joe Celko's book all the matter in the futures release.
April 26, 2005 at 11:38 am
Very, very nice. I do a lot with Hierarchies and this will really help when 2005 comes out. Your examples and text based diagrams are awsome. Thank you very much for taking the time to do this. We need to get someone to translate your books to English...
--Jeff Moden
Change is inevitable... Change for the better is not.
April 28, 2005 at 8:48 am
I apologize in advance if this set of questions takes the topic too far off track. We can easily take the conversations to a different thread if appropriate.
Excellent article. It is very clear that 2005 will greatly simplify traversing hierarchies and networks, at least from a syntax perspective.
Most of my work uses multiple orthoganal hierarchies and networks as a way to aggregate and analyze large volumes of data. For example, consider an organization hierarchy that is related to but not dependent on a geographical network. Using 2005, what happens to performance as we add this additional real world complexity?
In data warehouse terminology, the organization tree is a slowly changing dimension. The geographic tree and the time tree are static. Data is aggregated and analyzed along the organization tree, along the geographic tree, and along the "time" tree.
How might one change the examples to walk two or more trees at the same time? For example, suppose one wanted to stop in towns along the way and buy a bottle of wine. One would need to store the cost of a bottle of wine in each town, for each day, over the last few months. The "best" route then would consider not only the physical distance, but also the average cost of a bottle of wine over the last two weeks. This example requires us to walk the geography tree and the time tree at the same time in order to calculate the "best" route.
In my real work, there are actually nine dimensions of interest. Three of the dimensions are slowly changing dimensions, two are static dimensions, and four are flat dimensions. The dimensions are a mix of hierarchies and networks. Heterogeneous devices submit data on time intervals varying from sub-second to daily. My current approach is to use recursive algorithms to populate what Kimball refers to as bridge tables, and then associate the aggregate values with nodes in the bridge. Once collected, the data is stored in the warehouse and available for ad hoc queries for two years. Yes, there are multiple terabytes of data online for ad hoc query and analysis.
Given this problem space, how might one modify the examples to efficiently aggregate the data "on demand" rather than storing redundant data for each node in the hierarchies and networks?
Thanks in advance for any thoughts
Wayne
April 29, 2005 at 4:09 am
I am no shure to have well understand your problem. (My english is very far away in my mind...) But I think that valuated the nodes is perhaps not the good solution.
You can valuate the branches...
This can be done by adding a weight on the branches of the tree.
A weight can be constituted as a vector, wich allow as many dimension as you want, but produce a final result in term of "cost".
Let me give you an example wich is always about roads.
In france we have very small road call "chemin vicinal" with are close to lane. After we have "route departementale" wich is a step over managing by the department (equivalent of state in US), after we get "route nationale" wich are deliver and manage by the country and over we have "autoroute" wich are speedway.
The speed is limit as :
Type of road Km/h Average reduce factor
Vicinal 50 0,8
Departementale 90 0,9
Nationale 90 0,9
Nationale 4 ways 110 0,95
Autoroute 130 0,98
Then we can have some factors that are about where the road is : mountain, or flat land
Flat : 1
Small mountains : 0,85
Heavy mountains : 0,75
Then we can have some factors that are about the quality of surface of the road :
Flat : 1
Small holes : 0,9
Bad surface : 0,75
All thoses factors can be specify for all the branches of the tree. Then we can calculate the real travel time, and deduce that a Mac Truck model 125477 will cost 5444$ to go from Paris to Toulouse with 23t of duties
Is that transposable to your model ?
Thanks
September 14, 2006 at 11:29 pm
How did I ever miss this one!
Brilliant. Thanks ever so much.
__________________________________
Searching the KB articles is like
picking your nose. You never know
what you'll find.
October 20, 2006 at 12:46 pm
Merci Frédéric. Et la tristesse, je n'ai que SQL 2000.
And since your English is much better than my French, I'll just add that I concur with others here. Your article is one of the best I've seen on the subject. Thanks!
December 1, 2006 at 6:15 pm
What can i say.. I think is the best article i have read about using recursive queries in resolving problems. It was exactly what i was looking for. Thanks again for this great article!
Viewing 15 posts - 1 through 15 (of 34 total)
You must be logged in to reply to this topic. Login to reply