Small things

OK I will shoot these things out there as I find them . Either thtat or I'll just forget to mention them.

OK so consider working with databases for a second. There are three things (at least) I can do with them.

1) I can modify the properties of one which is open. (I can also modify the properties of one without technically opening it, but that's not relevant for my point).
2) I can create a new one.
3) I can open an existing one which is not open.

Ok so 1) creating a new one is pretty clear (except it's called data source ). Green + -> pick your DB -> main configuration dialog.

Then 2) modifying the properties (say, the name I am calling it) is pretty clear. Just right click on the name of the database whose properties you want to see or change -> manage data sources -> same as above.

But consider 3) opening  a currently closed database which does not yet appear in the tree of the Database window of the main GUI (henceforth "the tree"). How do I do that?

First, it's not File-> Open. That's OK. That's for something else.

Second , not green + , that's for creating a new database. <-- Ah actually this is not true.  But the issue described below regarding naming is still relevant  !



Whether I right click over the name of a database whose name I can see in the tree or whether I deliberately click *anywhere* else in that Database window of the main GUI, if I choose "manage data sources"  (as I must ) I am still going to get a data sources management dialog (title-Data Sources and Drivers) with information pertaining to a database already in the tree. Call it database X.

(Note that trying to avoid this by clicking at the very bottom of the Database window in the main GUI will STILL get me the a dialog pre-loaded with the properties of the bottom most DB in the tree. There is no loading an "empty"  Data Sources and Drivers dialog. )

Now watch what happens. I just want to load a different database, so using Path textfield and Database textfields  I go fish up some other database. I fill in what I want, click connect, see everything is well and I close the dialog. What is my state now?.

My state is I just screwed myself because I just effectively redefined what database X is; I changed all its properties

Look at the tree. The name of the database is still database X.  But I just associated database X with an entirely different database. When do I notice this has happened? Now? Later? If it's later I am in for some confusion and a little digging out.

The problem is that the 0xDBE name of the database (Data Sources and Drivers-> name textfield ) is meta-data about the DB which isn't durably linked to the database. Specifically, getting a  DB doesn't cause the name textfield to go fetch the name previosuly associated with this DB and autofill it. The current name persists.

Maybe I WANT to do that, but if so, then make me explicitly change the name textfield. Then of course you have to follow on with the usual file rename process. e.g.:

"There is already a database associated with the name X. Do you want to associate that name to this database? The previous database will be associated with the name UNNAMED_003"

...... or something.

There's a conceptual issue here. We have a DB which has a name given to it at the time it was created- a name ground right into the DB itself. This name can't be changed (easily, and by design of the DB makers lest chaos result in data centers worldwide) But there's this *other* name 0xDBE is giving it which is completely flexible and changeable and is a kind of meta-data associated (somewhat) with the database.

Because of this situation, when you go to give the user information about the database, what are you going to call it? How do you refer to it? Notice the clunky pretend dialog text I had to use to tell the user about the naming conflict above and the hackiness of my solution-

"The previous database will be associated with the name UNNAMED_003.."

What the hell does THAT mean? Well, what does that flexible name in the name textfield MEAN? Why is it something other than the (unchangeable) name of the database itself?

I am not criticising. I am thinking out loud. This is where the problem seems to stem from. What is that name for? What problem is it solving? Why isn't it persisted and anyways why isn't just the name of DB itself?

Please sign in to leave a comment.