how to insert the data that have the same id with data in the database.