Database Store

The database data store offers a mechanism for storing calendar objects and free/busy details in a database system, currently focusing on relational database systems, with specific support for PostgreSQL.

Benefits of the database store include convenient and standardised interfaces for querying and inspecting the data, together with various guarantees around the durability of the stored data. However, more administrative knowledge is usually required to operate database installations satisfactorily, and activities such as archiving require extra planning and expertise.

The file store offers a more convenient method of managing calendar data, albeit offering arguably less scalability and less convenience when data volumes become significantly large.

Configuration Settings

The configuration files (config.sh and config.txt) need to be updated when choosing a database store.

File Setting Value Description
config.sh STORE_TYPE postgresql Selects a specific database store type; currently, only postgresql is supported
config.txt
config.txt STORE_DIR dbname=imip_agent Indicates a connection string for the store database
JOURNAL_DIR dbname=imip_agent Indicates a connection string for the journal database

Journal Structure

The journal information is retained in a collection of tables. Unlike the structure of the file store in the filesystem, each table contains details for all quota groups, with each query indicating the group to select the appropriate information.

Table Purpose
journal_freebusy_other Period descriptions describing reservations for resources sharing a quota (store_user) made by users or groups (other), structured similarly to the freebusy table in the data store; this may be the same table as the one employed by the data store to store received or deduced free/busy details
journal_freebusy_providers Details of recurring events for which new free/busy records must be periodically generated because these events recur indefinitely, selectable for each user (store_user)
journal_freebusy_provider_datetimes Date/time details associated with the freebusy_providers information
quota_delegates Details of the identities (store_user) employing each quota (quota) to consolidate their schedules, between which delegation may take place if their schedules permit it
quota_limits A mapping from user identities or group identifiers to quota limits
journal_objects Records for each quota (store_user) containing received event data (object_text)
journal_recurrences Records for each quota (store_user) containing received recurrence event data (object_text)
user_groups A mapping from user identities to group identifiers indicating the sharing of a quota across a number of users

The journal_ prefix is employed for certain tables in order to allow the combination of the journal and store databases without each kind of data getting mixed up.

Store Structure

The store information is retained in a collection of tables. Unlike the structure of the file store in the filesystem, each table contains details for all users, with each query indicating the user to select the appropriate information.

Table Purpose
countered_objects Retains counter-proposals corresponding to events held in the objects table received by each user (store_user) from another user (other)
countered_recurrences Retains counter-proposals corresponding to events held in the recurrences table received by each user (store_user) from another user (other)
freebusy Period descriptions indicating start and end datetimes (in UTC), unique identifier (object_uid), transparency, recurrence identifier (object_recurrenceid), summary and organiser, reflecting the schedule of each user (store_user)
freebusy_offers Period descriptions for scheduling offers made by counter-proposals sent by each user (store_user)
freebusy_other Period descriptions received or deduced for a user (store_user) structured similarly to the user's own freebusy records
freebusy_providers Details of recurring events for which new free/busy records must be periodically generated because these events recur indefinitely, selectable for each user (store_user)
freebusy_provider_datetimes Date/time details associated with the freebusy_providers information
objects Records for each user (store_user) containing received event data (object_text)
requests A collections of records, each belonging to a specific user (store_user) consisting of a unique identifier (object_uid), normalised recurrence identifier (object_recurrenceid) if appropriate, and (optionally) a scheduling method, indicating the availability of an incoming scheduling request for handling by a user
recurrences Records for each user (store_user) containing received recurrence event data (object_text)