Add basic db functionality