We use the student database as our example to illustrate the usage of the XSB-DB interface in this manual. The schema of the student database contains three columns viz. the student name, the student id, and the name of the advisor of the student.
The XSB-DB package has to be first loaded before using any of the predicates. This is done by the call:
| ?- [dbdrivers].
Next, the driver to be used for connecting to the database has to be loaded. Currently, the interface has support for a native MySQL driver (using the MySQL C API), and an ODBC driver. For example, to load the ODBC driver call:
| ?- load_driver(odbc).
Similarly, to load the mysql driver call:
| ?- load_driver(mysql).