updating statistics, sql browser to new db api (issue #238, #240)