fox@fury
Heirarchical Databases
Wednesday, Aug 29, 2001
Watching ST: Voyager I was thinking about 'Voyager's database' and the sci-fi assumption that everything in a computer system is in a 'database.' I suppose that broadening the term to simply refer to a repository of information would mean that any hard drive, isolinear chip, or filing cabinet is a 'database of information' but then I starting wondering what it would look like if all data really were in a database.

On one level, that would be easy to do: Simply take each file and put its ascii or binary data in a database field, and put its name, modification date, file type, and other metadata in other fields in the same entry and voila, it's in a database, albeit a shallow, general purpose one.

But what about the files themselves? What if, in an XML-like fashion, every file's data were in turn kept in a database? What if individual file contents consisted entirely of its own database, with its own schema, stored procedures, and all the rest? For example, one of the nifty things about mySQL is that each table is kept as a file on the hard drive, and you could back up by exporting a dump of SQL calls needed to reconstruct the database, or you could just copy the table file and put it in a safe place. What if these files were in turn kept in binary format in the fields of another, encompassing database? So that regardless of differences in schema from file to file, data would still be kept in databases within databases, or hierarchical databases?

To take it a step further, what if the SQL language (I hate saying that like I hate saying 'ATM machine' 'RAID array' 'PIN number' or any other redundant acronym) were extended to allow for 'deep queries' that would be able to isolate records and then further qualify and manipulate contents of the databases stored within the data of those records themselves? Excel spreadsheets could be stored in a database format, alongside powerpoint presentations, word files, email repositories (with records being individual email messages, which in turn could have attachments with embedded databases), and so on.

On some level what I'm talking about boils down to hierarchical XML, but with the power of SQL built into it. XML is an ideal format for transmitting information, as databases are for storing it. XML has the added features of DTDs to specify the format particular datatypes should follow, while SQL has unique schemas. Perhaps they both could learn a bit from each other.

Anyhow, no rousing conclusion here, other than to say I've got to get to bed. Stayed home sick from work today, went to the doctor, and the fun goes on and on. I just wanted to type this one into the ether before going to sleep and having it replaced by random dreams...

If you like it, please share it.
aboutme

Hi, I'm Kevin Fox.
I've been blogging at Fury.com since 1998.
I can be reached at .

I also have a resume.

electricimp

I'm co-founder in
a fantastic startup fulfilling the promise of the Internet of Things.

The Imp is a computer and wi-fi connection smaller and cheaper than a memory card.

Find out more.

We're also hiring.

followme

I post most frequently on Twitter as @kfury and on Google Plus.

pastwork

I've led design at Mozilla Labs, designed Gmail 1.0, Google Reader 2.0, FriendFeed, and a few special projects at Facebook.

©2012 Kevin Fox