Chapter 11. Persistence with Record

 

The previous chapter discussed Mapper and how you can use it to define an active-record style of interaction with a relational database. Mapper is one of the oldest parts of the Lift framework, and some of the ideas that were born in Mapper eventually evolved into another persistence system called Record and Field, or Record for short.

Record builds upon the idea of having contextually rich fields in your data model, but allowing you to interact with any data storage mechanism. This data storage could be a relational database, a NoSQL solution such as MongoDB, or even something as primitive as a filesystem. Record is ultimately a specialized persistence facade designed to make the development of web applications more intuitive, no matter which system is actually doing the persistence.

This chapter discusses the anatomy that all Record facades share, irrespective of their storage mechanism or actual function. Many parts of Record have been influenced directly by its initial vision of “keeping the meaning with the bytes.” You’ll see how Record shares and improves upon concepts from Mapper and gives you a contextually rich wrapper around different persistence technologies and libraries.

11.1. Common Record functionality

11.2. Record for relational databases

11.3. Record for NoSQL stores

11.4. Summary