Database connection and sql builder done.