BentoUsers

An Introduction to Databases

A two-tier burgundy lacquer bento box tied with a strap
A two-tier bento box, the app’s namesake. Photo: goblinbox (CC BY 2.0).

Bento is mostly a flat-file database with some relational features, and it hid both well. If that sentence means nothing to you, here is what it means.

Flat-file databases

A database is a store of information kept in tables. Each table has fields, the categories of information, and records, one entry each. An address book is the classic example: the book is the table, name and phone number are fields, and each person is a record. You find people by searching, so the order you entered them in does not matter.

A flat-file database keeps everything in one such table, like a single sheet of paper.

Where flat files break

Imagine a mail-order business tracking customers, orders, products and suppliers. In flat tables, every order repeats the customer’s full details and every product repeats its supplier’s. The same data gets typed again and again, and sooner or later someone types a name wrong. Then a search for that customer’s orders misses some of them.

Relational databases

A relational database stores each kind of thing once, customers in one table, products in another, and links them. An order points to a customer instead of copying them. Change a customer’s address and every order sees the new one.

Bento’s related records lists gave it a simple version of this: a library can show records from another library that are linked to it.

Why it matters when you move

Exports flatten things. A CSV file is one flat table, so links between libraries do not survive it. If your libraries are linked, read Importing Related Data Into Bento before you export.

The Bento years in pictures

Photos: goblinbox (CC BY 2.0), David Wellbeloved (CC BY 2.0), Uadro (CC BY-SA 4.0) and Martin Pettitt (CC BY 2.0), via Openverse and Wikimedia Commons.