This document describes the design and rationale of a database layer for the SAINT software. It addresses problems with using different SQL dialects and limitations of data types across databases. The solution involves creating extended Qt SQL drivers that generate SQL queries without hardcoding actual SQL. This allows manipulating database structures and using different databases without code changes. It also describes a unified database selection UI and classes for managing database connections and transactions.