Skip to main content
14 events
when toggle format what by license comment
Mar 5, 2021 at 7:17 history edited nvogel CC BY-SA 4.0
grammar
Jun 9, 2020 at 10:36 comment added nvogel @Vérace, SQL is used by millions of information workers who are not professional programmers but who just want to write useful queries. You are right that the ones who are programmers have to spend a lot of time hiding the complexity of things like 3VL from the people who use their systems. Unfortunately many highly experienced SQL developers don't have a good understanding of advanced SQL topics like 3VL either - not least because different DBMSs implement different rules.
Jun 9, 2020 at 6:28 comment added Vérace Re. the quote from @nvogel The usefulness of an information system surely depends on the ability of an average non-mathematician to understand it. - I disagree with this - it's up to those of us who programme SQL to either have or obtain a grasp of the 3-value logic of NULLs and apply that when we write information systems! That's why we get paid the big bucks! (I wish - :-) ). One doesn't have to have a grasp of SQL to use an ATM, but the banks are using SQL in the background - Seán Citizen can remain oblivious to what the electrons are doing behind his cash withdrawal!
Jun 9, 2020 at 6:26 comment added Vérace @philipxy My brother-in-law is a tiresome pedant in everything but where it counts - in this case it does count and your "pedantry" (in the positive sense of the term in the sense of wanting to clarify an important point!) in this case is justified!
Jun 8, 2020 at 23:24 comment added philipxy @Vérace "unique" & "distinct" are SQL terms that don't have their normal meanings. 2 values are SQL-distinct if they're not the same non-null value. An SQL-unique collection/bag of values is one where all are SQL-distinct from the others. But here nvogel is using the normal meaning. It's of course important to be clear about definitions of terms. Re terms meaning different things in relational theory & SQL.
Jun 8, 2020 at 18:31 comment added nvogel @philipxy, good point and you are absolutely right. But you see what I mean by "everyday". The usefulness of an information system surely depends on the ability of an average non-mathematician to understand it.
Jun 8, 2020 at 17:49 comment added philipxy SQL = is not equals on scalars. It's like equals but it treats null differently. SQL is not distinct from is equals on scalars.
Jun 8, 2020 at 17:39 comment added nvogel @philipxy, Don't all values have the property of being equal to themselves? x=x is true if x is 7 but not if x is a null. Don't all values have the property of being not equal to other values? x='x is false if x is 7 but not if x is a null.
Jun 8, 2020 at 17:33 comment added nvogel @Vérace "multiple nulls are allowed" is correct. That's what I mean when I say that uniqueness is not enforced. It's possible to have duplicate rows if you allow nulls so the rows won't necessarily be unique in the case of a nullable UNIQUE constraint.
Jun 8, 2020 at 10:35 comment added Vérace In standard SQL a uniqueness constraint does not enforce uniqueness if any column permits nulls. - see the thread following the question - apparently, the standard does not say this - multiple nulls are allowed for UNIQUE constraints! The thing everybody agrees on is that a NULL cannot be part of a PRIMARY KEY!
Jun 8, 2020 at 8:01 vote accept Lokesh Reddy
Jun 8, 2020 at 7:19 comment added philipxy Saying null is not a value (whatever that means) or that it is a marker (whatever that means) just promotes confusion & imprecision & is an impediment to clear thinking. Null is a value treated in a certain way by SQL syntax & operators. In "everyday mathematics or logic" anything can be a value, and null is a structureless everyday boring one like 7.
Jun 7, 2020 at 18:50 history edited nvogel CC BY-SA 4.0
grammar
Jun 7, 2020 at 15:13 history answered nvogel CC BY-SA 4.0