Computer technologies offer us a wider range of nonlinear ways to read, but current markup-based standards of text encoding do not allow us to exploit the full potential of the digital environment. The relational database, another well-established method of encoding information, suggests another definition of text, not as a hierarchical structure but as a "labelled network of language objects." This alternative model allows text not only to be stored in a database but also encoded as a database. Some applications of this model are illustrated from our current work with Glyphicus, a database-building tool that we are using to encode the Middle English long poem Sir Perceval of Galles.