MicroDB:
A Distributed, Tag-Based Database
for Annotating Anything and Everything

Shell: Quick Reference

PERMALINK • 2019-02-10T20:00:00Z • Nick Radcliffe
PREVIOUS: Introducting MicroDB
INDEX

This post describes the MicroDB shell, which is a Unix-like shell for interacting with MicroDB.

Shell Commands: Quick Reference

show [-t] OID [TAG]              --- show all tags or OID or the chosen tag
tag  [-f] OID TAG VALUE [TYPE]   --- set tag TAG to VALUE on OID (opt. type)
rm   OID [TAG]                   --- remove all or nominated tag(s) from OID
ls   [-l] OID                    --- list tags on an object

help                             --- show the help
pwd                              --- print working database information
whoami                           --- print username
. [-f] FILE                      --- execute commands from FILE
exec [-f] FILE                   --- execute commands from FILE

Here:

Types

Tags in MicroDB can contain values, and those values have types.

One of the values a tag can have is the null value null. There is no distinction between a tag whose value is null and a tag without a value.

MicroDB uses both base types, MIME types and special types.

Base Types

The base types stored in MicroDB are:

MIME types

MicroDB currently understands a subset of MIME types in addition to base types. This set is likely to expand over time, and it is possible that MicroDB will eventually understand arbitrary MIME types.

Currently supported MIME types are:

Special Types

Automatic Type Inference

When using the tag command, the type of values will be inferred, if not specified explicitly, using common-sense rules.

If tag names are chosen that look like file names with extensions, the extension will be used to infer the type when this is possible. The following tag extensions are used for this inference.