Is it a bad idea to ask my erstwhile PI to say in a recommendation letter he "forgot" to acknowledge me in a prior work?
You should ask the professor to describe your contribution to the database and the relationship between the database and the publication.
No matter what the reason is that you are not an author on the publication, there is no benefit to including the reason in your letter of recommendation.  A correction to the author list could benefit you, but only someone familiar with the details of your work could determine if that is appropriate.