Handling database operations the proper way.