(tagfs)

a semantic filesystem for Linux kernels

based on libfuse

written by Tx0 <tx0@StrumentiResistenti.org>

SQL(ite) schema used to store tags and cache

Tagsistant uses SQLite to store informations, starting from revision 23. Tags and relations are stored in two tables, the first asserting the existance of a tag while the second stating that a file has been tagged.

Let's see the schema used. First table is called tags:

idinteger primary key autoincrement not null
tagnamevarchar unique not null

This table id values are later used in tagged table to bind tags and contents:

idinteger primary key autoincrement not null
tagnamevarchar not null
filenamevarchar not null

filename is the name of the file relative to archive/ directory.

Every query is also cached in a separate table, with following schema:

idinteger primary key autoincrement not null
pathtext not null
agedatetime not null

Of course, the age column act as a timestamp to discard old queries. Query results are stored in a separate table which joins with this one on id column. This is the schema:

idinteger not null
agedatetime not null
pathvarchar not null

As you can see, single results are timestamped too.


Valid HTML 4.01 Transitional   Valid CSS!