Base for db manipulation