Updated Database to support check function