I looked at the wiki page for the db and it's equal to the log of the mesured voltage (give by analogRead() ) divided by a referenced voltage which is 0.775 V.
Here the equation :
volt : voltage return by analogRead()
db = log(volt/0.775)
It may be useful to test it with a true measuring device.