draft database implementation