Refacotr -> Reusable code for searching / inserting to different databases