SIMPOL Documentation

Chapter 14. Using SBME Databases in SIMPOL

This chapter will describe in detail the issues surrounding database access in SIMPOL using the Superbase Micro Engine (SBME). The SBME is a new, next-generation database design that incorporates support for all of the value data types (as well as some additional data types that have a single value for an object of that type that is of one of the value types) that are included in the SIMPOL programming language. The database engine has few limitations and is extremely fast with a very small footprint (ca. 150 KB).

[Note]Note

The single-user engine is accessed using the "sbme" component. The multiuser engine currently only provides PPCS Type 1 access. This engine is included as a three-user test version on the same machine where the IDE is installed. The multi-user engine component "ppsr" is the only current way to access the new database engine for multi-user access. A later multi-user engine will provide PPCS Type 2, which will allow for the full array of capabilities provided by SIMPOL. If you are planning to use the multi-user engine then it is recommended that no use be made of blob, boolean, or datetime fields since these are not supported for mapping to PPCS Type 1.

Introduction

The SBME database engine is a high-performance database engine that provides a fairly low-level API for accessing database tables and records. It is not an SQL-style API but rather a table and record-oriented one. The current engine provides a storage-only database (no calculations, constants, validations, triggers, etc.). The format is as follows:

  • SBME database files have an sbm extension

  • The file can contain one or more database tables

  • All of the parts of the database table are contained within the database file

  • Each table consists of one or more fields and 0 or more indexes

  • A field has a datatype that must be one of the value types or else a date, time, or datetime

  • An index is currently associated with a specific field, though in future may be over multiple fields

One of the more significant points to be aware of is that there is no column width or display format associated with a field.