The Database Relational Fuckup

In his book The Database Relational Model on page 25 Date says:

Here I would just comment–here comes the hindsight once again–that if as suggested earlier the database is to be regarded as a (correct!) logical system, it must never be allowed to contain any inconsistencies, at least from the user’s point of view. In other words, “remedying inconsistencies” needs to be done on an individual statement-by-statement basis (not even on a transaction-by-transaction basis). See reference [52] for further elaboration on this point.

Reference [52] is then:

C. J. Date and Hugh Darwen: Foundation for Object/Relational Databases: The Third Manifesto. Reading, Mass.: Addison-Wesley (1998). A second edition of this book, under the revised title Foundation for Future Database Systems: The Third Manifesto, is due to appear concurrently with the present book.

I think Date did a lot of harm with this comment. The classic example of a transaction is taking $100 from my account and depositing it in your account. So there’s one statement to take the money out, and another statement to put the money in, and after the first statement but before the second statement the database will always go through an invalid state. If RDBMS integrity facilities were on a transaction-by-transaction basis we could actually use them, as they’re not we suffer. Either we need to do more work than necessary or we have to under specify our constraints, or some awkward combination of both.

Omitting date completed from MySQL dump file

By default when you run a dump with ‘mysqldump’ the date of the dump is appended to the file, e.g.:

jj5@love:~/desktop/experiment$ udiff *
--- dbt__jj_dev_1__svn_jdrepo.1.sql     2019-06-11 18:11:13.267758230 +1000
+++ dbt__jj_dev_1__svn_jdrepo.2.sql     2019-06-11 18:12:03.856075974 +1000
@@ -32,4 +32,4 @@
 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

--- Dump completed on 2019-06-10 21:59:44
+-- Dump completed on 2019-06-10 12:06:49

This causes dumps for a single database that has not changed to have two dumps which differ. It’s better to have dumps from the same unchanged database to be the same. To facilitate that add the –skip-dump-date option when running ‘mysqldump’.

See here for the back-story.

Adding weekday to Date column in Dolphin in KDE on Debian GNU/Linux

cd /usr/share/i18n/locales
cp en_AU en_JJ
vim en_JJ

Change metadata:

title      "English locale for John Elliot V"
language   "John's English"

And prefix d_fmt with:

d_fmt "<U0025><U0061><U0020>

Then:

sudo localedef -f UTF-8 -i en_JJ en_JJ.UTF-8

Then:

vim /etc/environment

add add:

LC_TIME="en_JJ.UTF-8"