My head hurts. So then why does the map need to be in a database table?
Or will you have several possible maps?
And why would you only use an on/off indicator? Why wouldn't you do something like
var map = [
where each letter is used to indicate what is there on the map? (e.g., f==forest, w==water, C==castle, g==grass, p==path).
And make it a 2D array, instead of just 1D, so the you can easily reference it via