DatabaseAdapter code example for IOS