Appendix A. PRIME SQLite Log Database

The PLC Sniffer creates a relational database using SQLite to store the PRIME logs. Using this type of database to store the information helps to handle logs from complex networks and to inspect the data in very flexible ways. Third party tools to handle SQLite databases can also be used. A useful tool for SQLite database inspection is the SQLite Manager plug-in for Firefox browser.

The current version of the database has 24 tables. New tables have been included since version 1.1.9 to accommodate changes in the new PRIME 1.4 version. This is the list of tables:

All tables are linked through a common “idFrame” index. This unique index is assigned when a new frame is inserted on the database. This allows building complex search queries with SQL. Table fields are encoded as specified in the PRIME standard.

Figure 1 shows the tables and relations of a PRIME 1.3 log database. New PRIME 1.4 tables connect in similar way to the table Frame.

Figure 1. PLC Sniffer Prime 1.3 Log Database

A few examples of queries are: