Object-relational mapping(Java, Python)