Added all functions to work with tables in db