Assigning Data to Terrain Grid Squares

Hello, I created a projected grid all over my terrain. I am attempting to create something similar to Sim City. I need to divide my terrain into many squares or boxes that should hold data such as altitude, access to water, education etc. Can anyone lead me to a method of how it could be done, also if this can be done using a database?

Try a multi-dimensional array:

create something like a int[,] mapData. It would work as follows:

// x,y are the coordinates on the grid

int[x,y]['alt']= altitude;
int[x,y]['water']= access_to_water;

//etc