Model based schema