Chapter 9. Database facilities and techniques

This chapter covers

  • Using plain text data storage
  • Automating contacts in an address book
  • Using Ruby’s API for gdbm
  • Using relational databases

So far we’ve taken a look at a number of technologies and how to use them with Ruby. This chapter will introduce key database tools available with, and for, Ruby. We’ll take a broad view of what it means for something to be a database. Our working definition will be that a database is a storage unit external to your program where data can be stored. This definition includes highly evolved structures like relational databases, but also includes, potentially, plain-text files.

We’ll also stipulate that the stored data has to have some intelligence about itself. ...

Get Ruby in Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.