update dabase code