5.2. GNUMed Database Architecture

Supplied by Horst Herb

5.2.1. Client-Server architecture with optional middleware layers

GNUMed is designed as a client-server architecture with optional middleware components. The database backend is provided by PostgreSQL, a largely SQL-92 compliant object-relational database server. PostgreSQL is free software, obtainable at http://www.postgresql.org. It is portable, running on virtually all Posix compatible systems including Gnu/Linux, BSD Unix, Solaris, Mac OS/X. Although we do not recommend it, it can be run on Microsoft Windows NT, 2000 and XP.

5.2.2. Distribution of database services

GNUMed allows distributions of database services. Closely related information like a person's name and address are regarded as a "service", which may or may not be hosted on the same physical server as other services. Developers have to refer to the list of services when designing database queries. A central pivot database provides information about the nature and whereabouts of distributed services. On the client side, distribution is made transparent to the developer and end user through a "database service broker" object which not only hides information about service distribution, but can also be used for load balancing , reusable connections and database replication in future versions.

5.2.3. Normalization of data

Tables are normalized to the 3rd normal form as long as this does not deteriorate query performance too much. In order to simplify client software development, a pseudo-denormalization is achieved through updateable views. Foreign key constraints ensure referential integrity of highly normalized data. Reference counter tables keep track of cross-database relational integrity, as PostgreSQL does not allow (yet) cross-database constraints and queries.

5.2.4. Audit trailing

Trigger functions ensure business logic and audit trailing . Deleting and updating of data is caught by triggers, and copies of the originals are kept in audit trail tables at all times. Database programmers need not to worry about this, as all audit trail related triggers and tables are generated automatically. In order to achieve this, we do use postgres specific extensions such as table inheritance and built-in procedural languages such as pgsql, pgtcl and pgpython. Thus, gnumed can not be easily ported to a different database backend.

5.2.5. Access control

The PostgreSQL server supports secure authentication protocols such as Kerberos as well as secure communication protocols between client and server(s) such as SSL. In addition, data of more strictly confidential data wil be stored encrypted with arbitrary algorithms; although the cryptographic process is performed on the client side, this is supported by the GNUMed server through a sophisticated key management. A user hierarchy can be implemented, and access to tables and procedures can be regulated through this hierarchy on the server side.

5.2.6. Multigenerational concurrency control and backups

PostgreSQL uses a multigenerational concurrency control system. This not only avoids most locking situations, but also allows life "snapshot" backups of the complete database system while the system is running even under full load.