NotATether's sollution works...
If you want an easyer method that allows you to greatly simplify the backup procedure, you could also use electrum, let it generate a seed phrase, write down this seed, then go to electrum's console and do:
wallet.change_gap_limit(10000)
wallet.storage.write()
listaddresses()
Then you'll get a list you can import into a db.. Do prepare to wait a LOOOOOONG time... A 10.000 gap limit isn't small...
TBH, my sollution isn't per defenition better than NotATether's, it's just differrent

I would say that using a deterministic wallet is superior to generating private keys individually. The resources to monitor transactions sent to the addresses is the same for both, however keeping backups and storing the private key is much easier with a deterministic wallet.