sql2api db access layer