MOT databases are just groupings of tables. The only purpose of a MOT database is to group a set of tables into a convenient collection that can be viewed together. This notion of a database allows you to put the same table in more than one database, which is really useful for certain generically useful tables (i.e. Users and People) as well as for creating different ways of viewing the same information (i.e. using both a 'Job Tracker' database for use by the IT staff and a 'Software Solutions' database for viewing by support clients).
Tables are the heart of the MOT system. Each table is a collection of fields, which can be either bits of data or links to other tables, and actions, which can be triggered either by accesses of or by changes to the table. Note that each table is wholly self sufficient in that it can be included in any number of databases.
A field defines a single piece of information that can be included in a table definition. A field can either be a simple piece of data, such as a string, a number, or a date, or a link to another table. Fields are highly configurable. Be sure to read the following information on field options carefully so that you can take full advantage of MOT.
More help is available on the following topics: Type, Sort Order, Display Order, Sort by, Restrict by, Default Restrict, Blanks, List View, Detail View, Add View, Modify View, Single Link, Table, Link to, Help Text
Actions are custom scripts which are automatically fired by specified database actions (adds, modifications, etc.). They are immensely helpful for implementing things like email notification and timestamping.
Since action scripts must be written in php, you have to know php to take advantage of them. You will also probably want to know some SQL (MOT-SQL, actually) to do anything very interesting.
MOT-SQL allows you to access your MOT databases by running ordinary sql queries through a preprocessor that translates your MOT table and field names (i.e. 'Users' and 'Admin') into their actual sql representations.
The MOT-SQL preprocessor uses the following constructs:
Note that, due to my currently crappy implementation, each table can only be joined into a query once. So, you cannot, for example, include two different links to the same table in a single query.
MOT supports exporting and importing database schemas, so you can share any particularly nifty databases that you create. MOT uses a homebrew xml format to save the databases and its own, completely php-based xml parser to load them, so there is no need to recompile php.
For the most part, you can remain blissfully ignorant of the xml format, since MOT can
create the export file for the database schema. If you want to include data in your exported
database, however, you will have to manually add in the correct
More help is available on the following topics: Query Tag