Add db functions.