O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction

So far, we have looked at Haskell language features, type classes, and collections and worked with various examples. But all of those constructs were purely Haskell features. In this chapter, we will be interfacing with the outside world (apart from the console), by interacting with databases.

To be able to write a backend, or a storage service, it is imperative that we will at some time think about storing the data in a relational database, or a binary serializable format or a file such as JSON or YAML. In this chapter, we will use the persistent library to work with relational databases. Using the persistent model, we will define the relations, do a query, insert, update, and a deletion of the stored data. We will move on to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required