|
|
foreign key scanner Saturday, November 25 2006
Throughout the day I built a whole suite of web-based MySQL database tools. Some were familar from such places as phpMyAdmin, allowing an administrator to do queries with raw SQL or drop or empty tables presented in a list. Others were particular to my special system, which permits an administrator to wander around in a relational database, following the relations between tables. When setting up such a system, levels of functionality appear with the arrival of tables (or sets of tables). For example, administration is totally open for anyone who stumbles in (security through obscurity) until the table tf_admin is created, after which time anyone hoping to administrate is required to log in. Other features, such as field-level help, table-level administrator priviledges, the ability to seamlessly add additional custom editors, and packages for complex online calendars, web stats, and an advertisement system, are all possible with certain tables. These are the complex (but generic) fundaments that keep coming up in web applications and I've supported them in my system's core. One of the tools I created today was a primitive package manager allowing an administrator to add these tables (and rows of data inside them) simply by checking off items in a list. As of yet there is no provision for removing packages other than by dropping the tables that the package manager creates.
My single most interesting tool today was one that scans through a database and proposes (based on field names) foreign key relationships between fields in tables. If an administrator checks off (accepts) the proposals and clicks a button, these relationships are created. These are actually stored in a user table (tf_relation), since I've yet to successfully make use of MySQL's built-in foreign key support. Such relationships are extremely important in my system because they're what allows its tools to form a user-friendly editing system, as opposed to just another clunky database tool.
This evening as Gretchen and I were going to bed, I saw a wet white thing wriggling slowly in the hair near Julius the Cat's asshole. It was about a half inch long and I knew immediately that it was some sort of parasitic worm. Gretchen snatched it up and did some internet research, deciding that it was a segment from a tapeworm.
It's never pleasant to find yourself suddenly dealing with a tapeworm, but these days it turns out that they're relatively easy to erradicate. It's not like the old days of the late 1970s, when on one occasion my mother found herself reeling out yards of a dead tapeworm from the asshole of Wilbur the Dog, to whom she'd given some sort of primitive tapeworm-destroying potion. Modern tapeworm medications actually dissolve the tapeworm in the intestines and you never have to deal with the mess. Gretchen suspects that Julius got his tapeworm by eating a flea-ridden mouse. (Eating fleas is how most animals get tapeworm.)
[REDACTED]
For linking purposes this article's URL is: http://asecular.com/blog.php?061125 feedback previous | next |