Originally eXtremeSQL was implemented as a compact set of C++ classes that provide SQL access to eXtremeDB databases. The eXtremeSQL C API consists or low-level C functions which are actually a "thin wrapper" over these C++ classes. The usage of these C functions is demonstrated in the SQL C SDK Samples. For developers new to eXtremeSQL, we recommend the Quick Start tutorial to quickly learn the programming fundamentals. Then proceed to build and run the SDK samples.
As demonstrated in these samples, an embedded SQL application will define its database schema using the eXtremeDB DDL then compile the schema using
mcocomp
as for all C and C++ applications. The applications will then use the static C API functions to start the eXtremeDB runtime, specify memory devices and database parameters, and then callmco_db_open_dev()
to open the database andmco_db_connect()
to create a database connection. This database connection (handle) is then passed to the eXtremeSQL functionmcoapi_initialize()
to initialize the SQL wrapper. Thenmcosql_open()
is called to open an SQL engine.This SQL engine structure is used for all SQL database access through functions
mcosql_execute_query()
andmcosql_execute_statement()
.Please use the following link for general principles of embedded eXtremeSQL application implementation using the C API.