Just FYI: this is a system / network administration issue, not a programming issue. You could probably get better answers faster elsewhere.
That says ... it's pretty simple: you just need a DNS server that supports the database database for its data. Then you simply record the records in the database or query the database for what's there, and the DNS records will be automatically submitted. Ideally, use a database that supports triggers so that you can automatically update the serial numbers of DNS records when changes occur. Otherwise, you will need to read / write the serial number in each change of your code, having performed all the updates in the transaction.
Edit: just saw another comment above. Do not allow AXFR. This is considered a security risk these days.
You have TTL sites installed at the level, so updates spread to other servers quickly.
source share