To run QLink from Wolfram Mathematica, execute Install["QLink"] (replace "QLink" with a full path to QLink executable). Now you can use the following commands:
QOpen[database]: open a database file or directory; If the database name ends with a slash, then the corresponding directory is considered to be a database directory, otherwise a file is treated as a database file. The file version has a 2GB size limitation, the directory version has a 1TB limit.
QRead[database]: same with QOpen, but opens the database for reading only. This is a safe way to open a database with no risk of hindering it in case of abnormal program termination.
QClose[database]: close the database; this is the only safe way to stop working with a database.
QRemoveDatabase[database]: remove the database file or directory (only on closed databases).
QRepair[database]: try to repair a broken closed database; success not guaranteed (ONLY WITH THE OLD VERSION OF QLink; THE NEW VERSION WON'T CRASH WITH THIS COMMAND, HOWEVER THERE IS NO NEED TO RUN IT AT ALL - THE DATABASE IS REALLY STABLE)
QSize[database]: returns the size of the database (in bytes).
QList[database]: list all entries in the database.
QPut[database,key,value]: put an entry in the database with the specified key and value.
QGet[database,key]: retrieve the corresponding value from the database; an error message is produced in case of no entry.
QCheck[database,key]: check if there is an entry with such a key; the answer is boolean.
QSafeGet[database,key]: same with QGet, but returns False in case of no entry; QSafeGet is faster than QCheck plus QGet.
QRemove[database,key]: remove an entry from the database.
QSetBucketSize[size]: set the bucket size to 2^size (with 8 bites used for each bucket entry); ONLY WITH THE NEW VERSION OF QLink
You should keep in mind that all the keys and values are supposed to be Mathematica strings. Therefore, convert expressions to Strings before saving them in the database. An input format will work quite well.