Database Access

Magnolia uses a PostgreSQL database backend for all database access. All databases are stored in a single PostgreSQL database.

Paths and filename are used to build the database table name.

General schema

Random-access databases are turned into tables with primary keys.

Sequential-access databases are turned into tables with a synthetic auto-incrementing integer primary key.

Seperate database emulation

DB files can be mapped with different tablenames, depending on the original filename.

See db.emulation for the configuration info.

On-the-fly creation and upgrades

New tables are created on the fly. Every connection/user needs to have appropriate DDL modification rights.

Missing fields in tables are added automatically.

Fields are never dropped or altered.

The copytable tool

A tool is provided to copy a table between different schemas. This is useful to create per-user or per-machine tables.

Usage:

MagProjectBuild -t copytable [schema1.]table_source [schema2.]table_dest

The destination table MUST NOT exist before running copytable.