Update #78, add db functions.