Sunday 15 July 2012

A thought on databases

It seems to be that there is a fairly generic database structure that could be useful for many applications whereby every record in the database can link into any other record, with those links being either hierarchical or non-hierarchical.

The database would require three tables: a records table; a hierarchical relationships mapping table; and a non-hierarchical relationships mapping table.

A potential use is a hierarchical tagging mechanism, whereby tags are not a separate class of data to the items they are tagging: they themselves are records in the main database table. A tag can be a daughter of any number of other tags.

When viewing a single record you can see its parent list, its child list, and its related list (i.e. non-hierarchical relationships). It would be possible to do queries such as: show all records that are the immediate descendants of record X and have any kind of relationship with record Y.

1 comment:

adreama said...

A list of relationships:

http://adreama.blogspot.com/p/key-information-relationships.html