Added misc DB functions