Modified database code.