10 Database operations

A cloud is a cloud

This chapter covers

  • Fetching data from the database
  • Storing data in the database
  • Manipulating data fetched from the database

Traditionally in OOP, we use design patterns and complex layers of objects to structure access to the database. In DOP, we prefer to represent data fetched from the database with generic data collections, namely, lists of maps, where fields in the maps correspond to database column values. As we’ll see throughout the chapter, the fact that fields inside a map are accessible dynamically via their names allows us to use the same generic code for different data entities.

💡Tip The best way to manipulate data is to represent data as data.

In this chapter, we’ll illustrate the application ...

Get Data-Oriented Programming 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.