liveBook · Manning

Database

As explained in Functional Design and Architecture: Examples in Haskell

A database is an organized system for storing, managing, and retrieving structured data.

A database provides external storage for data that cannot remain directly in program memory. Applications treat data storage as an abstraction, while the underlying system may be relational, key–value, filesystem-based, or cloud-based. section 11.0 section 3.2.2

Designing database persistence requires decisions at several levels:

  • Clarify requirements first, because they shape storage choices and database behavior. section 12.2
  • Choose the storage technology, access method, libraries, and database management approach. section 12.2
  • For relational systems, define schemas, tables, relations, normalization, indexes, queries, views, and server-side functions. section 12.2
  • Keep the application architecture independent by placing the database behind an abstraction or subsystem interface. section 3.2.2 section 3.2.3

Database in an application architecture

The Andromeda Control Software places a relational database alongside the GUI and business logic. Each major area has its own abstraction, while a central layer connects the application’s components. section 3.2.3

Figure 3.13 Architecture diagram for the Andromeda Control Software

Use the architecture diagram to trace how the relational database relates to the GUI, business logic, central layer, configuration, and application state. section 3.2.3

How Functional Design and Architecture: Examples in Haskell covers it

How deep it goes
Descends from architectural placement to relational schemas, normalization, indexes, SQL, and ORM challenges.
Examples
Uses relational storage in the Andromeda architecture and a raw, then type-safe, key–value database subsystem.
What you can do after
Evaluate requirements, storage technologies, schemas, access libraries, and abstraction boundaries for application persistence.
How it connects
Connects databases with data storage, SQL, schemas, tables, relations, normalization, indexes, ORM tools, and free monad interfaces.

Also explained in

Compare how 24 books explain database →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Functional Design and Architecture: Examples in Haskell. The section links point to the parts of the book it draws on.