Similar maybe, but NOT identical. Besides “adding new records to the database” is not the same as “generating similar code”.
If each time I run the same piece of code to generate new records in the database, how does the act of running the code violate the DRY principle?