Re: recursive queries?
От | Ron Peterson |
---|---|
Тема | Re: recursive queries? |
Дата | |
Msg-id | 38F342E4.E5ADE2D8@yellowbank.com обсуждение исходный текст |
Ответ на | Re: recursive queries? (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-general |
Peter Eisentraut wrote: > > Ron Peterson writes: > > > The problem is, while it's easy enough to define such a data > > structure, support for recursive queries is rather lacking. To unroll > > a directory tree, you basically have to resort to programming in > > <insert your favorite language>. > > Well, nothing is perfect, and this is exactly the point where relational > databases aren't. A lot of people that are a lot more educated than me on > the matter have commented on just this in detail for years and decades so > you should be able to find enough material out there if you're interested. > Apparently, this sort of thing worked in network and/or hierarchical > databases (which came before relational) and object oriented databases are > supposes to fix it again, but the fact that all the world uses relational > databases shows that either recursion (infinite joins) isn't widely useful > or that the other advantages outweigh this problem. Not sure. Don't get me wrong, I think SQL is wonderful. That's why this problem is so fustrating. What I want to do seems _almost_ in reach, but not quite. Defining recursive data structures is certainly possible in SQL, but that's as far as it goes. There's no standard way to define validation rules, or recursive queries. I have read various mail threads and whatnot that have alluded to sQL standards committees looking at the possibility of remedying these deficiencies. But I haven't been able to find any evidence that these efforts are actually underway. Does anyone know what direction the evolution of the SQL standard is headed? I keep struggling along with SQL not because I don't think recursive data structures are useful, but as you say, "the other advantages outweigh this problem". How would they be useful? It's not hard to come up with some examples of useful problems where SQL falls short. How about a genealogical database? Threaded mail or news discussions? Web site layouts. Etc. I think all of these examples could benifit from being implemented in a system that support transactions and relational calculus. I suppose I'm just another lazy activist - "Somebody should do something!" I can suffer along for now, but what I'm really wondering is if the investment I make now in SQL will be rewarded later when SQL adds new and better features. Should I just hold my horses because something better is coming along, or look elsewhere? Ron Peterson rpeterson@yellowbank.com
В списке pgsql-general по дате отправления: