Which data structure to use for semi static data?

Matthew Margolis
2005-05-29T20:56:05Z

I have a three level deep hierarchy  building > apartment > room.  The
listing will only change once a year and will consist of a hefty number
of subtractions and just a few additions.  I will be using each level in
the hierarchy as a limiting factor in choosing which items to show from
the level below it in an option select box in a form using some ajax.

So to start you would have a drop down labeled building.  If you choose
building ''10'' an ajax request will be made that will create
the code to
render a drop down that lists all the apartments in building
''10''.  When
you chose the apartment an ajax request will be made that will render a
drop down list with all the rooms in that specific apartment.

With this knowledge how would you recommend that I store my hierarchy in
my application?  It doesn''t change very often so I was thinking that
maybe I should not throw it in the db.  If I keep it purely in code as
some sort of class or hash structure then I won''t have to hit the db so
often and initial setup could be done inside of a text editor as opposed
to the having to use funky sql syntax or slow phpmyadmin record entry
forms.


Thank you,
Matthew Margolis