How to persist a lot of boolean fields

oracletable

I need to persist on Oracle Db the follow check box table :

enter image description here

The simple thing that I can imagine is to create a Table with 15 boolean fields, but since that the rows and the columns could increase I would to know if there is a better way to persist this table without to provide a table of Number of rows * Number of Columns.

Thank You in advance for the replies

p.s: the meaning the table is to mean:

  • is the north Mountainous? true o false?
  • is the north Hilly? true o false?
  • is the north Flat? true o false?
  • is the Middle Mountainous? true o false?
  • etc.

Best Answer

If you are concerned about the size you can do a binary lookup:

North = 1
Middle = 2
South = 4
Est = 8
Ovest = 16
Mountainous = 32
Hilly = 64
Flat = 128

Of course, then you have to write a function which translates your number into readable results.