finish the card database foundation