Builds adaptable database layer.