the language is so terrible and inconsistent. I want to stab out my eyes just reading it. How do I force myself to read the entire thing without having a nervous break down and come to after implementing a full replacement in lisp?
Stop thinking of it as a language. SQL is not designed to be used like a normal programming language, it's designed to be used from within other programs to grab shit from a database in a manner that meets your current needs.
SELECT trips FROM prog WHERE dick_size > 5 ORDER BY iq
It does exactly what is says it does. What is your problem here?
Name:
Anonymous2013-08-12 5:19
Learn by using.
Name:
Anonymous2013-08-12 5:21
>>2
Seems to have a basic understanding of french. Likes french culture? Not obviously of great intelligence it seems though smart at programming.
Name:
Anonymous2013-08-12 5:36
It's stuff like this.
https://en.wikipedia.org/wiki/Sql#Null_and_three-valued_logic_.283VL.29 There are however disputes about the semantic interpretation of Nulls in SQL because of its treatment outside direct comparisons. As seen in the table above direct equality comparisons between two NULLs in SQL (e.g. NULL = NULL) returns a truth value of Unknown. This is in line with the interpretation that Null does not have a value (and is not a member of any data domain) but is rather a placeholder or "mark" for missing information. However, the principle that two Nulls aren't equal to each other is effectively violated in the SQL specification for the UNION and INTERSECT operators, which do identify nulls with each other.[20]
http://www.sqlite.org/lang_createtable.html The exception mentioned above is that if the declaration of a column with declared type "INTEGER" includes an "PRIMARY KEY DESC" clause, it does not become an alias for the rowid and is not classified as an integer primary key. This quirk is not by design. It is due to a bug in early versions of SQLite. But fixing the bug could result in very serious backwards incompatibilities. The SQLite developers feel that goofy behavior in a corner case is far better than a compatibility break, so the original behavior is retained. This means that the following three table declarations all cause the column "x" to be an alias for the rowid (an integer primary key):
It's such a simple language, yet it manages to have quirks. Anything rooted in compatibility becomes a mutated mess.
>>19
Is Nikita really Yannick? Did Nikita use a fake name to get a job from Krueger (which he failed to perform due to being a dumb fucking goy)? Will Krueger succeed in getting his money back?
Find out all that and more, on the next episode of autism.
>>13-Friday
Mais Donald D. Chamberlin et Raymond Boyce 'Ray' du SQL, et D. Richard Hipp de SQLite sont des Américains. La seule autre personne serait Edgar F. Codd, qui est l'anglais, mais il est venu vivre dans le États-Unis d'Amérique.
Proposez-vous à vos clients sont français, ou l'affiche originale est jeune Madame.
The IS and IS NOT operators work like = and != except when one or both of the operands are NULL. In this case, if both operands are NULL, then the IS operator evaluates to 1 (true) and the IS NOT operator evaluates to 0 (false). If one operand is NULL and the other is not, then the IS operator evaluates to 0 (false) and the IS NOT operator is 1 (true). It is not possible for an IS or IS NOT expression to evaluate to NULL. Operators IS and IS NOT have the same precedence as =.
Casting a TEXT or BLOB value into NUMERIC first does a forced conversion into REAL but then further converts the result into INTEGER if and only if the conversion from REAL to INTEGER is lossless and reversible. This is the only context in SQLite where the NUMERIC and INTEGER affinities behave differently.
Casting a REAL or INTEGER value to NUMERIC is a no-op, even if a real value could be losslessly converted to an integer.
For example, the values NULL, 0.0, 0, 'english' and '0' are all considered to be false. Values 1, 1.0, 0.1, -0.1 and '1english' are considered to be true.
>>27
Have you not gotten by now that NULL is a void, the black hole of SQL-ites? Just don't use it, it has no practical value. Unless you need to send something to the NULL. However logically the excerpt is still correct.
Name:
Anonymous2013-08-14 2:44
>>31
I'm ok with there being a meaningless value. I just wish it's rules for evaluation were smaller.
________________________________________________________________________________________________________________
/Left operand is | Right operand | Right operand is | Left operand found within | Result of IN | Result of NOT \
|NULL | contains NULL | an empty set | right operand | operator | IN operator |
+----------------+-----------------+------------------+---------------------------+--------------+---------------+
|no | no | no | no | false | true |
+----------------+-----------------+------------------+---------------------------+--------------+---------------+
|does not matter | no | yes | no | false | true |
+----------------+-----------------+------------------+---------------------------+--------------+---------------+
|no | does not matter | no | yes | true | false |
+----------------+-----------------+------------------+---------------------------+--------------+---------------+
|no | yes | no | no | NULL | NULL |
+----------------+-----------------+------------------+---------------------------+--------------+---------------+
|yes | does not matter | no | does not matter | NULL | NULL |
\________________:_________________:__________________:___________________________:______________:_______________/
If it takes a 5x6 truth table to explain the behavior of a primitive function, there's something wrong. It's behavior should be determined from a minimal set of unbreakable axioms.
>>32
Well, there are lots of things to compare across databases, so lots of evaluations need to be made across multiple requirements. The reason a primitive functions are profusely described is to leave little to no doubt as to what there specification is. Yes, it can be summarized, but what you are reading the lexicon, which describes the entire syntax the most minute detail. If you want the encyclopaedia use this link: http://www.sqlite.org/lang.html
Well, there are lots of things to compare across databases, so lots of evaluation functions needed to be made to provisioned for multiple requirements.
Also, the reason primitive functions are profusely described is to leave little to no doubt as to what their specification are. While it is true that the commands/functions can be summarized, what you are reading the lexicon, which describes the entire syntax the most minute detail. If you want the encyclopaedia use this link:
Holy hell, you can tell how drunk I am.
Name:
Anonymous2013-08-14 4:19
>>33
My criticism isn't about the documentation, but the thing being documented. The truth table should be an exercise, not a definition. The behavior should be a result of fundamental laws of how NULL interacts with other data types, and these laws should remain consistent throughout the entire language.
>>35
Are you finding any inconsistency? The truth table is used to described the behaviour of a command, it is part of specification. The literary construct is called an example or description. In s lexicon, it is completely required, since you are delineating what a new word/command is, and how it incorporates to the language.
>>36
There isn't inconsistency in the spec. The problem is the spec is too large.
What is the intuition behind this?
select NULL in () -> 0
select NULL in (7) -> NULL
select 7 in (7, NULL) -> 1
If NULL is meaningless, why should `NULL in ()' be meaningful? Why is (7, NULL) meaningful? There are rules that outline the results of these cases, but the rules are at too high of a level. If the rules were smaller, there would be an explanation for the results above, rather than a definition. And the explanation might make sense to someone, as opposed to memorization of that's just what sql does.
NULL is considered a false value, description of no value. In those example, you are almost saying something like this:
select NO_VALUE in (NO_COMPARISON) ->[yields] 0 (NOTHING)
select NO_VALUE in (A_REAL_VALUE&NUMBER:7) -> NO_VALUE[nothing to compare with. E.g. do you compare colours to numbers?]
select REAL_NUMBER:7 in (ONE_REAL_VALUE:7, NO_VALUE) -> ONE_REAL_COMPARISON
I do not were you reading that, but you should first learn SQL from a beginners book or article. If you target is SQLite, I gave lots of resources, and how to find them. You can even buy books. Once you have done so, you can properly understand why the grammar of a specification is created such way. Did you learned how to build a bike first before you road it⸮ Or did you learned how to ride the bike from an expert before you learnt how to assemble and/or repair yours⸮
tl;dr Look for beginners' learning material first, before you delve into the specifications.
Name:
Anonymous2013-08-15 1:12
>>39
Um, you understand that I'm criticizing sql right now right? Not expressing difficulty in learning it? I am learning it right now, and if I wanted to learn it as fast as possible I would start with the tutorials, but I'm doing this on my own time and would rather analyze it as a language first.