Get function for the variable database