Library for constructing terminal emulator interface

Hi all:

Absolute know-nothing newbie here; please pardon my ignorance of
everything.

I’m looking to write a database interface that will run on any platform
in a
character-based terminal emulator environment. What is the best
resource
library/toolkit/whatchamacallit for the interface? I want maximum
flexibility as far as looks and functionality so I can get it just the
way I
wan it.

Thanks,
Kenquad