dbTalk Databases Forums  

Need Efficent Query

comp.databases comp.databases


Discuss Need Efficent Query in the comp.databases forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old   
toby
 
Posts: n/a

Default Re: Declarative languages in (not so) common use, was Re: NeedEfficent Query - 11-19-2007 , 12:54 AM






On Nov 19, 3:04 am, Lennart <Erik.Lennart.Jons... (AT) gmail (DOT) com> wrote:
Quote:
On Nov 19, 2:36 am, toby <t... (AT) telegraphics (DOT) com.au> wrote:
[...]

(when was the last time you used Erlang or Icon?

When was the last time you used [a spreadsheet] or OOCalc? ;-)
Not considered languages either, but thanks for the good examples.

(Disclaimer: Of course I am using a very broad brush with my list -
just trying to catalogue interesting 'non-imperative' tools, since
imperative is such a deep rut in computing culture... Evolved
languages frequently offer a mixture of paradigms. SQL itself is not
purely declarative either.)

Quote:
[...]

/Lennart


Reply With Quote
  #42  
Old   
Ed Prochak
 
Posts: n/a

Default Re: Declarative languages in (not so) common use, was Re: NeedEfficent Query - 11-19-2007 , 10:41 PM






On Nov 18, 8:36 pm, toby <t... (AT) telegraphics (DOT) com.au> wrote:
Quote:
We are still waiting for the DWIMNWIS computer. I think it will be a
long wait.

(DWIMNWIS = Do What I Mean, Not What I Say)

That isn't the problem. That is exactly what the problem is not. The
problem is that a reasonable person (such as the OP of this thread) can
write a query that says *exactly* what he means, and it still isn't good
enough. He has to discover some equivalent but different formulation,
somehow, by no means anyone can explain except by cataloging "tricks that
have worked in the past and might continue to work in the future".

That is exactly the problem in this discussion. SQL promises to
provide correct results, ...
The SQL standard, as I understand the situation (I haven't read the
real standard, just summaries), leaves optimization or performance
features in the hands of the DBMS products.
[]

To the extent that we have people that are Expert SQL programmers and
unable to program in anything else, I would agree that this is a bad
thing. Otherwise, I think your optimizer arguement would apply to
about any programming language.

No, SQL is unlike any other comparably widely used language because it is
declarative.

Roy

You are saying SQL is the ONLY declarative language?

I don't think he's saying that. He qualified it with 'comparably
widely used'. No 'widely used' programming language is declarative
(when was the last time you used Erlang or Icon?

I am not an expert, but other things that I would consider declarative
are:
- makefiles (commonly used, but hardly considered a 'language')
- grammars (lex, yacc)
- regular expressions
- pattern matching &/or functional languages (Erlang, Mathematica)
- backtracking &/or inferential languages (Icon, Prolog)

...additions to this list welcome.

Nice examples. make is a great example. Thanks.


Reply With Quote
  #43  
Old   
toby
 
Posts: n/a

Default Re: Declarative languages in (not so) common use, was Re: NeedEfficent Query - 11-30-2007 , 05:35 PM



On Nov 18, 11:36 pm, toby <t... (AT) telegraphics (DOT) com.au> wrote:
Quote:
We are still waiting for the DWIMNWIS computer. I think it will be a
long wait.

(DWIMNWIS = Do What I Mean, Not What I Say)

That isn't the problem. That is exactly what the problem is not. The
problem is that a reasonable person (such as the OP of this thread) can
write a query that says *exactly* what he means, and it still isn't good
enough. He has to discover some equivalent but different formulation,
somehow, by no means anyone can explain except by cataloging "tricks that
have worked in the past and might continue to work in the future".

That is exactly the problem in this discussion. SQL promises to
provide correct results, ...
The SQL standard, as I understand the situation (I haven't read the
real standard, just summaries), leaves optimization or performance
features in the hands of the DBMS products.
[]

To the extent that we have people that are Expert SQL programmers and
unable to program in anything else, I would agree that this is a bad
thing. Otherwise, I think your optimizer arguement would apply to
about any programming language.

No, SQL is unlike any other comparably widely used language because it is
declarative.

Roy

You are saying SQL is the ONLY declarative language?

I don't think he's saying that. He qualified it with 'comparably
widely used'. No 'widely used' programming language is declarative
(when was the last time you used Erlang or Icon?

I am not an expert, but other things that I would consider declarative
are:
- makefiles (commonly used, but hardly considered a 'language')
- grammars (lex, yacc)
- regular expressions
- pattern matching &/or functional languages (Erlang, Mathematica)
- backtracking &/or inferential languages (Icon, Prolog)
Today I discovered an intersection of Prolog and databases: Datalog
http://en.wikipedia.org/wiki/Datalog

Quote:
...additions to this list welcome.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.