© Peter Cooper 2016

Peter Cooper, Beginning Ruby, 10.1007/978-1-4842-1278-3_9

9. Files and Databases

Peter Cooper

(1)Louth, Lincs, UK

In this chapter, we’re going to look at how to store, process, and interact with external sources of data from our Ruby programs. In Chapter 4, we briefly looked at how to load files to get data into an application, but this chapter will extend upon that greatly and allow you to create files from scratch from your Ruby programs.

Later in this chapter, we’ll look at databases—specialized organizations of data—and how to interact with them, along with some notes on interacting with popular database systems such as SQLite, MySQL, and PostgreSQL. You can use databases for simple tasks such as storing information about ...

Get Beginning Ruby: From Novice to Professional, Third Edition 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.