complete database operation