PostgreSQL® Schema

The PostgreSQL® database schema contains several tables:

  • systems – contains information of the systems of the WinCC OA project.
  • elements – contains information of the data point elements that must read/write/archive their values.
  • archive_groups – contains archive groups of the backend.
  • elements_to_archive_groups – defines relations (many-to-many) between "archive groups" and "elements". This table allows storing crossing for multiple archive groups.
  • segments – stores segments of archive groups.
  • _event_%segment_id%_a – stores simple (non-dyn) EVENTS values.
  • _events_%segment_id%_d – stores events for dyn values.
  • _alert_%segment_id%_a – stores ALARM values.
  • _alert_%segment_id%_add – stores additional values for ALARMS.
  • configuration – is used as a key-value storage of internal parameters, which are defined when the DB is created.
  • scheduler_tasks – contains information about the last successful periodic tasks execution and its execution period in seconds.

The database provides the following VIEWS:

  • view_events – the view contains the union of all EVENTS segment tables with statuses ONLINE, CURRENT, ONLINE AND BACKUPED and RESTORED.
  • view_alarms – the view contains the union of all ALARMS segment tables with statuses ONLINE, CURRENT, ONLINE AND BACKUPED and RESTORED.
Figure 1. PostgreSQL® Database Structure