optimization database construction