lift allows you to create model objects that map themselves to and from the database. Here's an example of a "User" model object.

There are records in the "Person" table. The first one is . Press to create more records.

    /**
     * The singleton that has methods for accessing the database
     */
    object User extends User with MetaMapper[User] {
      protected override def internalTableName_$ = "users" // define the DB table name

      // define the order fields will appear in forms and output
      override def sws_fieldOrder = id :: firstName :: lastName :: email ::
      password :: textArea :: Nil
    }

    /**
     * An O-R mapped "User" class that includes first name, last name, password...
     */
    class User extends ProtoUser[User] {
      def getSingleton = User // what's the "meta" server

      // define an additional field for a personal essay
      val textArea =  new MappedTextarea(this) {
        override def textareaRows  = 10
        override def textareaCols = 50
        override def displayName = "Personal Essay"
      }
    }

For this little bit of work, we get a complete user with first name, last name, password, email, and a personal essay. Each of the fields knows how to validate itself. The User (and any other "Mapped" class) knows how to Create, Update, Read, and Delete itself from the database. It knows how to convert itself to a string, to XML, and even generate HTML forms for itself.