build db tables