In this case you can gradually start creating Active Record s and then slowly refactor behavior into them. Often it helps to first wrap the tables as a Gateway , and then start moving behavior so they evolve to a Active Record . This is a simple, even simplistic, example to show how the bones of Active Record works. To load an object the person class acts as the Data Finder and also performs the load. It uses static methods on the person class.
Insertions are also mostly pretty simple.
A simple technique is to find the max of the current id. It's a nicely simple technique, but has the big disadvantage of locking the entire table while it executes this query.