Overview – MiG InfoCom MiG Calendar DBConnect Guide User Manual

Page 7

Advertising
background image

MiG InfoCom AB

It should be noted that it is the exact same Java code that is run for
the different databases*. Standard SQL is used and JDBC
functionality that is supported by all databases/drivers above. This
means that it is quite probable that other databases is working as well.
For adding a database to the supported list, after thorough testing,
contact

[email protected]

.

*

Oracle returns all numeric column values as BigDecimal. This is why an

OracleAdapter is included. The code for creating the database, which is normally

only done for testing purposes, has slightly different defaults as well.

Overview

Database Updates

DBConnect is monitoring changes in MiG Calendar's

ActivityDepository

and

CategoryDepository

classes

and when changes are discovered converts that change to a database
action that is put in a queue. There is a separate thread that is reading
from this queue and commits the actual changes to the database.

Database Reads

The database is read in the same way it is written. A read action is put
on the database queue and when it is its turn, which is normally right
away, data are read from the database and put in the corresponding
depository in memory.

ActivityDepository and CategoryDepository

MiG Calendar has two central classes that holds activities (e.g.
events, todos and tasks) and categories (e.g. priorities, activity
owner(s), basically any way you would like to “tag” activities)
respectively. This makes managing entities (Activities and Categories)
simple for the application developer. These two classes are also the
focal point for DBConnect. The advantage with this approach is that
since these two classes are used as the in-memory storage for
entities in all MiG Calendar applications, there is little, if any, changes
that are needed to make the (your) application synchronization
aware.

The DBConnect Architecture
At the lowest level a property of the activity/category is mapped
to to a column or an XML element/attribute with a
PropertyMapping object. All property mappings that are
intended for one database table or XML element are then

DBConnect Guide

Page 7 / 25

Advertising