that value can be assigned to them. Control flow constructs provided include if-elseif-else and case statements along with several loop control constructs (including while, repeat-until, and for loop statement). Seamless access to SQL is provided via the ability to execute most SQL statements that can include references to locally declared variables. Also provided is the ability to declare cursors allowing rows from select statements to be fetched into locally declared variables, allowing the result column values to be checked and manipulated within the stored routine. Exception handling is also provided, allowing handlers to be coded for specific or classes of errors or statuses returned from the execution of an SQL statement. In addition, it is also possible to define a user condition and exception handler and for the program to signal its own, special-purpose exceptions. RDM SQL has been designed specifically for use in embedded systems applications. Some of the more important features of RDM SQL include: Small footprint—no SQL views or security is provided as these are usually unnecessary in embedded systems apps and their absence helps to keep the SQL footprint small. Standard SQL transaction and referential integrity support. The SQL system catalog and stored procedures can be stored in a file or as statically declared data structures in C modules. Cost-based query optimization with a rich set of built-in scalar and aggregate functions. A variety of table access methods are available for consideration by the optimizer: direct row access (through rowid primarykeys), optimal primary/foreign key join access through network model sets, B-tree and hash indexes. Ability to extend SQL capabilities through C-based user-defined scalar and aggregate functions. Ability to extend SQL capabilities through C-based user-defined virtual table interfaces that provide SQL access to external data sources such as real-time sensor data. Database table import/export to/from comma-delimited or XML files. Ability to have read-only access from SQL to a non-SQL (i.e.,core level) database. This means, for example, that a remote RDM SQL application can access a non-SQL RDM database running on a very resource-restricted device. Application programming interfaces RDM provides application programming interfaces that allow application development in a variety of programming languages: C based Cursor API – Facilitates the traversal of database records for retrieval, insertion, update and removal of database records. With Record, Key and Set cursors, it fits seamlessly with RDM’s database concepts. It resembles modern programming concepts of iteration over a collection. Comprehensive SQL