Home
the-dark-batpup-returns
Eric TF Bat's Journal
It's People Like You What Causes Unrest
Captain's Log: The Database 
21st-Jul-2008 10:39 pm
the-dark-batpup-returns

Behold, this dump of test data from the Captain's Log database:

+--------------------------------+---------------------+
| Client                         | Staff Member        |
+--------------------------------+---------------------+
| Chapman & Co Phrasebooks       | NULL                |
| Idle's Bicycle Repairs         | NULL                |
| Jones and Jones Spam Supplies  | NULL                |
| Palin's Pet Shop               | NULL                |
| Cleese's Luxury Hotel, Torquay | Henry Wensleydale   |
| Gilliam's Cheeses              | Henry Wensleydale   |
| Mr Pither                      | Stavros Popolopolos |
| Mr Praline                     | Stavros Popolopolos |
| Raymond Luxury Yacht           | Stavros Popolopolos |
+--------------------------------+---------------------+

This is the beginnings of the data structure behind the software. My test data "user", Wensleydale's Cheese Emporium, employs two staff members, one to advise on cheeses and the other to give Greek Dancing lessons while playing the bouzouki. Rumour has it they also sell cheeses, but I'm not able to comment on that. Note how some clients "belong" to particular users, and others are available to both (and are therefore marked as NULL).

It took me entirely too long today to get the database worked out, because of a weird bug in the tool I was (perhaps foolishly) using to save me some time in setting things up: apparently, if you care, a table specified as "DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci" is incompatible, in certain critical ways, with another one specified as "DEFAULT CHARSET=utf8", even to the point of refusing to allow foreign keys to be set up. The tool I was using told me they were identical, because some programmer got his event handlers in a twist and forgot to write the code to save the crucial piece of data. And of course, the error message is tremendously informative:

Cannot find an index in the referenced table where the
referenced columns appear as the first columns, or column types
in the table and the referenced table do not match for constraint.

How obvious. Sigh. So, not much done apart from creating the database and doing up a bit of test data. Next trick will be to make the mockup display the test data, instead of the hard-coded bits it shows right now. That will have to wait a day or two though, since I also have to get the bloody Politarchopolis website sorted out...

Comments 
21st-Jul-2008 01:39 pm (UTC)
Ah, gotta love Monty Python. They are such a good resource.
22nd-Jul-2008 03:57 am (UTC)
The danger is in spending too much time researching amusing test data and not enough time doing the actual program. After I found myself contemplating a search to find the name of the man who operates the pet shop in the Parrot Sketch, I realised I was procrastinating, so I just made stuff up.
22nd-Jul-2008 04:00 am (UTC)
Do users see this table? I would have thought that 'Staff = NULL' would mean that no staff members were assigned to that client, rather than all staff members.
22nd-Jul-2008 04:22 am (UTC)
No, this is a dump from the database, just to demonstrate that I've gotten that far. I'm kind of liveblogging the whole development process here. What users will see is something like the mockup: a happy little personalised list of tasks and clients, a menu of operations and a big obvious section marked "Next:" to tell them what to do.
This page was loaded Oct 6th 2008, 8:50 pm GMT.