Work on database factory.