Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SQL is it real, is it general... is it readable?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Mar 18, 2016 3:29 pm    Post subject: Reply with quote

1clue wrote:
The question is, can a Turing complete language be described in English without ambiguity? Could a computer be created which parses English or a subset of English and which is Turing complete?

Turn it around: how could you possibly machine-parse (a subset of) English without a Turing-complete computer?

Note that the Turing-complete machine is prior art.

And isn't it true that we're already parsing subsets?
Quote:
There is no part of the definition which says a Turing complete language need ONLY have components necessary for Turing completeness.

Good point.
Quote:
Ambiguity can and frequently is misunderstood by humans, requiring clarification.

Indeed; though it's a lot harder to be so ambiguous in Latin or Classical Greek, or even German.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Sat Mar 19, 2016 5:29 am    Post subject: Reply with quote

steveL wrote:
...
That's all true, but it is still not a programming language for two reasons; firstly it is a declarative data-definition and -manipulation language, not a general-purpose programming language (be that imperative, functional or logical.)

Secondly, like C++, it took an ad-hoc approach to language design, with much the same outcome:
Date, Darwen wrote:
SQL in particular is very far from ideal as a relational language:

This criticism has been elaborated by the present writers in many places; ...
To quote from the first of these books ["Relational Database: Selected Writings", 1986]:

"...it cannot be denied that SQL in its present form leaves rather a lot to be desired
-- even that, in some important respects, it fails to realize the full potential of the
relational model."

The basic problem (in this writer's opinion) is that, although there are
well-established principles for the design of formal languages, there is
little evidence that SQL was designed in accordance with such principles.

As a result, the language is filled with numerous restrictions, ad hoc constructs,
and annoying special rules.

These factors in turn make the language hard to define, describe, teach, learn,
remember, apply, and implement.
from: "A Guide to the SQL Standard", C.J.Date with Hugh Darwen (3rd ed, corrected 1994); Ch 1.2

So as well as not being a general-purpose language, SQL also has no clarity; you cannot change this without designing a new language, in accordance with the basics.

In the C++ case, they are slowly iterating over that process every 5 years or so, to get to where LISP was 20 years before C++ started out, 30 years ago.
Though I don't think they will ever get rid of the ad-hoc parser, as backward-compatibility is much more important than people realise, especially when it comes to programming languages.

I agree SQL is code, though; just like make. ;)


If all languages were required to be Turing complete, then we wouldn't have to say "Turing-complete language" as a contrast to just any language. Therefore any language's Turing completeness status does not determine whether it's a language or not. Likewise, the term "General purpose" could substitute Turing-complete in my previous sentence.

A language must have subjects and actions and and syntax. SQL has all these. It is used to define and query a database. It need not be the only way one can communicate with a database engine, nor need it be the best way. It is, however, the most commonly used, most universally compatible language for database access. That there are many dialects does not detract from the definition of language.

I would submit that what SQL does is good enough to satisfy those who work with databases. I've been working with databases professionally for 20 years now. I've tried other programmatic means to communicate with databases, but somehow we always come back to SQL or SQL-like language.

I would submit that almost all of the world's money is managed with some dialect of SQL. I've had to interface with most of the enterprise-level financial applications used in the USA in my job, and every one I've worked with uses SQL on the back end.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Mar 19, 2016 4:08 pm    Post subject: Reply with quote

steveL wrote:
SQL is a declarative data-definition and -manipulation language, not a general-purpose programming language (be that imperative, functional or logical.)

I agree SQL is code, though; just like make. ;)

1clue wrote:
If all languages were required to be Turing complete, then we wouldn't have to say "Turing-complete language" as a contrast to just any language. Therefore any language's Turing completeness status does not determine whether it's a language or not. Likewise, the term "General purpose" could substitute Turing-complete in my previous sentence.

If that's what you wanted to say, then say so.

SQL is still not a general-purpose programming language; as pointed out above, it is a relational language.
Tell me, how would you read or write a file in SQL?

See: it's not a general-purpose language. That's not a criticism, since it was never meant to be such.

As for all your submissions, they are irrelevant, since I never made any criticisms they could be answering, and in fact have been using SQL professionally myself for two decades, just like you.

I never said SQL is crap, and has no place; just that it is neither a general-purpose programming language (which seems rather obvious), and that it has a crappy syntax.
That doesn't mean I don't use it, nor recommend people don't learn it.
Quite why you think I'd be quoting the book I did, and hold such a position, is beyond me.

edit:
1clue wrote:
The argument here IMO centers more around whether sql is a general purpose language. It's not.

So, we agree on the central point, and I have likely misinterpreted yours. (And/or we're both rambling.. ;)


Last edited by steveL on Sun Mar 20, 2016 8:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
kazdva
n00b
n00b


Joined: 14 Mar 2016
Posts: 26

PostPosted: Sat Mar 19, 2016 9:15 pm    Post subject: Reply with quote

'; DELETE FROM posts WHERE content LIKE "%SQL%"

You guys made so big offtopic here :)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Mar 20, 2016 3:48 pm    Post subject: Reply with quote

AdamScheller wrote:
'; DELETE FROM posts WHERE content LIKE "%SQL%"

You guys made so big offtopic here :)

Agreed, and reported so we should be split off soon.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Mar 21, 2016 4:09 am    Post subject: Reply with quote

1clue wrote:
While you're probably technically correct with reference to the difference between general purpose and a special purpose language, that sort of evades the point I was trying to make.
https://www.youtube.com/watch?v=hou0lU8WMgo

AdamScheller wrote:
'; DELETE FROM posts WHERE content LIKE "%SQL%"

You guys made so big offtopic here :)
No cause for deletion, just splitting.

steveL wrote:
AdamScheller wrote:
'; DELETE FROM posts WHERE content LIKE "%SQL%"

You guys made so big offtopic here :)

Agreed, and reported so we should be split off soon.
Believe it or not, I had been meaning to split it anyway. Whether that was going to be soon, is left as an exercise for speculative historians.

Split from "Is Gentoo user base Old or Young?".
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Mon Mar 21, 2016 3:42 pm    Post subject: Reply with quote

desultory wrote:
Believe it or not, I had been meaning to split it anyway. Whether that was going to be soon, is left as an exercise for speculative historians.

Split from "Is Gentoo user base Old or Young?".


Or, perhaps, left as an exercise in quantum theory. In some universe, you would not have split it off....
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Mon Mar 21, 2016 6:02 pm    Post subject: Reply with quote

steveL wrote:
steveL wrote:
SQL is a declarative data-definition and -manipulation language, not a general-purpose programming language (be that imperative, functional or logical.)

I agree SQL is code, though; just like make. ;)

1clue wrote:
If all languages were required to be Turing complete, then we wouldn't have to say "Turing-complete language" as a contrast to just any language. Therefore any language's Turing completeness status does not determine whether it's a language or not. Likewise, the term "General purpose" could substitute Turing-complete in my previous sentence.

If that's what you wanted to say, then say so.

SQL is still not a general-purpose programming language; as pointed out above, it is a relational language.
Tell me, how would you read or write a file in SQL?
See: it's not a general-purpose language. That's not a criticism, since it was never meant to be such.


Dude. I'm not saying sql is a general-purpose language, nor am I saying it's turing complete. You said it's not a programming language at all, and I disagreed with that. Edit: I added "programming" after the fact, for accuracy

Quote:

As for all your submissions, they are irrelevant, since I never made any criticisms they could be answering, and in fact have been using SQL professionally myself for two decades, just like you.

I never said SQL is crap, and has no place; just that it is neither a general-purpose programming language (which seems rather obvious), and that it has a crappy syntax.
That doesn't mean I don't use it, nor recommend people don't learn it.
Quite why you think I'd be quoting the book I did, and hold such a position, is beyond me.

edit:
1clue wrote:
The argument here IMO centers more around whether sql is a general purpose language. It's not.

So, we agree on the central point, and I have likely misinterpreted yours. (And/or we're both rambling.. ;)


Certainly we both fixate on nitty gritty details of this argument like a couple dogs who can't let go of the rope bone.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Tue Mar 22, 2016 3:53 am    Post subject: Reply with quote

1clue wrote:
desultory wrote:
Believe it or not, I had been meaning to split it anyway. Whether that was going to be soon, is left as an exercise for speculative historians.

Split from "Is Gentoo user base Old or Young?".


Or, perhaps, left as an exercise in quantum theory. In some universe, you would not have split it off....
Within certain constraints, the fields converge.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Tue Mar 22, 2016 5:35 pm    Post subject: Reply with quote

SQL is the worst way of accessing a DB... except for all the abstraction layers people create on top of it. Then you have two problems.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Mar 23, 2016 1:53 pm    Post subject: Reply with quote

steveL wrote:
SQL is a declarative data-definition and -manipulation language, not a general-purpose programming language (be that imperative, functional or logical.)

1clue wrote:
If all languages were required to be Turing complete, then we wouldn't have to say "Turing-complete language" as a contrast to just any language. Therefore any language's Turing completeness status does not determine whether it's a language or not. Likewise, the term "General purpose" could substitute Turing-complete in my previous sentence.

..
1clue wrote:
Dude. I'm not saying sql is a general-purpose language, nor am I saying it's turing complete. You said it's not a programming language at all, and I disagreed with that. Edit: I added "programming" after the fact, for accuracy

This is a bit ridonculous now: my first post on this immediately used the term "general-purpose programming language," agreeing with your earlier use of the term.

So I don't see why you keep picking on my posts to query; it does not serve any purpose.
Nor why you brought Turing-complete in above, as answer to my post about its lack of general-purpose.

I'd rather consider SQL Turing-complete than general-purpose, since it is feasible to save a query in a database, both as text and prepared, and later to evaluate it.

Turing-complete does not indicate general-purpose either, IOW, for all the talk of equivalence.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Wed Mar 23, 2016 6:06 pm    Post subject: Reply with quote

SteveL,

This is a general discussion, my posts which address you directly do not speak only to you.

However, your post in this thread DID claim that SQL is not a programming language:
Quote:

That's all true, but it is still not a programming language for two reasons; firstly it is a declarative data-definition and -manipulation language, not a general-purpose programming language (be that imperative, functional or logical.)

Secondly, like C++, it took an ad-hoc approach to language design, with much the same outcome:
...

That's mainly why I keep pestering you specifically.

@everyone:
Turing-completeness is part of the general discussion. General-purpose is part of the discussion. Claims that SQL is not even a language is part of the discussion.

Frankly I thought that this discussion was a bit ridiculous from the first reference to SQL. In an effort to provide an accurate view, I've been posting to it, although my references to English with reference to Turing-completeness is a bit of a lark.

Facts:

  1. A programming language is a formal constructed language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.
  2. Languages have syntax and lexical structure.
  3. This can be applied to any task a computer might want to do, including render text on a page or describe configurations in a standard way.
  4. This means that not are c, c++, FORTRAN, Java, lisp and sql languages, but so are HTML and XML.


HTML and XML are w3c specifications. The names themselves indicate that they are languages. They've been around for decades, and nobody with any authority has claimed that they are not actually languages. There is no credible discussion claiming otherwise. If markup languages are computer languages, then certainly so is SQL.

IMO arguments as to whether SQL is Turing Complete or general purpose have nothing to do with it. SQL is most certainly a computer language, end of discussion.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Thu Mar 24, 2016 5:19 am    Post subject: Reply with quote

1clue wrote:
This is a general discussion, my posts which address you directly do not speak only to you.

Then stop framing them as responses to what I have said, and just make a clean post.

It's not hard to avoid that misunderstanding, with a little thought.

Though self-evidently you have been addressing me, based on the above posts and on the following, indicating a lack of self-insight, afaic.
1clue wrote:
However, your post in this thread DID claim that SQL is not a programming language:
Quote:
That's all true, but it is still not a programming language for two reasons; firstly it is a declarative data-definition and -manipulation language, not a general-purpose programming language (be that imperative, functional or logical.)

Secondly, like C++, it took an ad-hoc approach to language design, with much the same outcome:
...
That's mainly why I keep pestering you specifically.

Funny how you quote the second part, which is what I think actually annoyed you, and has nothing to do with the specific point you are still arguing..

But all you are doing now is demonstrating what I said above (which the post history does as well):
steveL wrote:
my first post on this immediately used the term "general-purpose programming language," agreeing with your earlier use of the term.

1clue wrote:
Turing-completeness is part of the general discussion. General-purpose is part of the discussion. Claims that SQL is not even a language is part of the discussion.

And yet you keep quoting my posts, wherein I call SQL a language, and then forcing me to defend a nonsensical position that it is not a language, by claiming that is what I am saying. (A "straw-man" or simply continued arguing after over-reaction, the result is the same: shoddy argumentation.)

Firstly, don't tell me what I am saying, when I am speaking for myself. Allow for misinterpretation, and let it go, and focus instead on where the conversation goes to.

Secondly, pay attention to what I actually wrote, that you keep quoting, while blithely ignoring what it actually says.

Further, your "facts" are not facts, but rather summary description of your current understanding.
Don't mistake the two; I certainly won't.

Stop "pestering me specifically", please. I am not enjoying being on the end of your misapplied argumentation, that feels like overreaction, and an inability to backtrack.

Regards,
steveL.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Thu Mar 24, 2016 5:19 pm    Post subject: Reply with quote

I think that SteveL and I are doing the same thing, to each other.

If I actually seem that ridiculous then my apologies to everyone. While SteveL has had many more "discussions with the moderators" than I have, I have absolutely no desire to go down that track.

On that note, I'm going to say everything that SteveL says must be true, and I'll step out of the discussion. He can be "ridonculous" by himself, he obviously needs no help from me for that.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Mar 26, 2016 4:41 pm    Post subject: Reply with quote

No offence, but I haven't been putting words in your mouth, and then criticising you for uttering what was never said.

Nor have I resorted to veiled insults.

About the only thing you've said about me that is true, so far, is that I focus on detail, too.
If the shoe is not correctly shod, it will fail just when it is most needed.

But yeah, I'm tired of it too. Have your rope back. ;)
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2569

PostPosted: Sun Mar 27, 2016 4:18 am    Post subject: Reply with quote

steveL wrote:
No offence, but I haven't been putting words in your mouth, and then criticising you for uttering what was never said.

Nor have I resorted to veiled insults.

About the only thing you've said about me that is true, so far, is that I focus on detail, too.
If the shoe is not correctly shod, it will fail just when it is most needed.

But yeah, I'm tired of it too. Have your rope back. ;)


24th post of this thread.
https://www.anony.ws/image/JPK7

So does that count as you saying that it's not a programming language?
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Mon Mar 28, 2016 4:03 am    Post subject: Reply with quote

1clue wrote:
I think that SteveL and I are doing the same thing, to each other.
You are correct, hence this topic has been locked. If you wish to continue report this topic, or this post, and it can be unlocked in a week.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum