next up previous contents index
Next: (Integra)tion via the library Up: libIntegra: a system for Previous: IXD (Integra eXtensible Data)   Contents   Index

Subsections


Database

For persistent storage of module data and other data relating to musical works we have designed and configured an on-line database. The database comprises a postgresql back-end, and a web-based UI written in Python. Postgres was chosen because of its reliability, maturity and close-coupling with the data-structures to be stored. Because postgres is an object-relational database management system (ORDMS), we were able to utilise the facility to create inheritance relations between tables, mirroring inheritance between module classes. We also make extensive use of postgres' array type.

In the Integra database, the module definitions are stored in one table, with references to data in a number of supplementary look-up tables. For example, the module definition shown in Table [*] would be stored in a single row in the Module Definitions table. Data in fields such as 'Attribute Unit Codes' are stored as integers that are used as indices to a look-up table. This is done to ensure data consistency, efficiency of storage and fast look-up.

The 'Attribute Units' look-up table might look as shown in table [*].


Table: Typical look-up table
Field Value
1 Hertz
2 Radians



Database UI

The only way in which users may add new, or edit existing module definitions is via a web-based interface. It also provides mechanisms for uploading and downloading module definitions, and collections. Once a module definition has been added to the definitions table, the database schema is extended through the addition of a corresponding table to hold the new module's instance data. When a module definition is added to the database, the module's parent is specified, and only attributes that differ from those provided by its parent are added. An inheritance relation is then created between the new module's instance table, and the parent module's instance table. This means that all of the parent module's attributes then become available to instances of the child module.


next up previous contents index
Next: (Integra)tion via the library Up: libIntegra: a system for Previous: IXD (Integra eXtensible Data)   Contents   Index
Jamie Bullock, Henrik Frisk