Book Image

Clojure Web Development Essentials

By : Ryan Baldwin
Book Image

Clojure Web Development Essentials

By: Ryan Baldwin

Overview of this book

Table of Contents (19 chapters)
Clojure Web Development Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 7. Getting Started with the Database

In my first year of computer science education, I tried to avoid databases as much as possible. I naively said, "Why do I need to learn about databases? I have no desire to be a DBA!" It didn't take long until I realized you can't do anything interesting and ongoing if you don't know how to interact with a database. So far, we've created a fair bit of plumbing in our hipstr application, but we have yet to actually save anything to the database. This chapter is going to change all of this. In this chapter, we will cover the following topics:

  • Set up the database schema using PostgreSQL

  • Learn how to maintain and migrate database schemas using the Migratus Leiningen plugin

  • Insert data from the Sign Up form (built in Chapter 5, Handling Form Input) into the database using the brilliantly simple SQL library YeSQL

This, and the following three chapters, will cover basic database interactions. This chapter provides the foundation of the meat of our application...