iOS Model and Database classes