making DB abstract.