Strongly typed, compile-time safe and loosely coupled data persistence