Utility to handle mysql tables as objects