Update db.py

There were a couple of places where "references" should have been "reference"