Early database code