Base insert database functions