Create the database factory
minor fix