Implementing Active Records like functionality.