Q: Do you have a best practice setup for creating databases?
It depends on what you want to do with it. The system uses the data partition type 'stream' by default. This will result in a .bdbx, which can only be read by Blaise. It’s also possible to store data In Depth (one table with one column per question type) or Block-Structure (one table for each Block definition).
Q: Do you recommend a specific database to use with Blaise 5?
The Blaise system uses SQLite, but for heavy production-load questionnaires a Server Database like MySQL, SQL Server or Oracle is recommended. The system also supports PostgreSQL.
Q: What is the difference between the Session Database and the ‘real’ Database (.bdbx)?
The Session Database is similar to the Blaise 4 WorkDB. It stores data at every server contact while a record is being filled out (if it has a Primary Key). It also saves state and auxfields. For a completed case (the ReceiptPage has been reached) or on a Save Action, it will copy the actual data (from Fields) to the .bdbx. On re-opening a case, the data will be gathered from the Session Database first, and if there is no data there, it will fetch the data from the .bdbx. A new Session will open in the Session Database, using the stored values, but the data already stored in the .bdbx will stay there as well. Another Save Action/completed case will overwrite the .bdbx.
Note that the session data is stored in memory and flushed to the Session Database every 10 seconds (by default). Should you restart a case within those 10 seconds (either through the Blaise system or the Session API), the data will be pulled from memory. Should you try to look at the sessiondata (with a SQL browser for instance) it is possible that you will experience that 10 second delay.
The session data in CAPI/CAWI/CARI/APP should be the same, they both post the data of the page to the data entry server, which will handle all requests in the same manner.