Hardcoding things related to data in the database

Hi,
What do people think about hardcoding stuff related to data in the
database? Obviously, there are some things which you have no choice
abnout, but where it can be avoided, should it? I would think so, but
I don’t really have the experience to know if it really is something
to avoid.

Let me give an example (albeit very vague) of what I mean. An object
in your model can be type 1 or type 2 (stored in the ‘type’ field in
the class’s table). One type requires one layout in the view, and
another requires a completely different layout. Obviously this is one
case where hardcoding can’t be avoided, which means that if you want
to add a third type, you have to change your code. But if it can be
avoided by, say, adding an extra two tables to your database, should
you?

Hope you all understand what I mean.

-Nathan