saving patents on to database