a simple database implementation