Modified file with back-end database functions.