added code to persist movies to database i.e insert when new and update when existing