functional db