Catalogs (how do they work?)

Lately I’ve been thinking about search bars. We have them on our computers, our phones, and our websites. Library websites have a lot of search bars. How are these little boxes able to deliver results for materials?

text from a MODS record
MODS record screenshot

So how does a search for library materials work? There’s three main components to a search system: the data, the database or datastore, and the index. These have various functions so let’s look at them individually.

The Data

Cataloging is a library activity where trained staff describe the materials owned by the library. These records are fed into the catalog system and are the foundation of the data you search and retrieve materials from. This data comes in different standards and structures to fit different uses and systems.

Databases

Databases (or more generally, datastores) are software tools that store the catalog records in a catalog system. There’s various models for how the data is stored and linked internally. The structure of the data going into the datastore puts some constraints on how the it can be organized internally. Most library catalogs use Relation Databases like MySQL.

The index

Searching across the datastore is inefficient. It’s a tool that’s optimized for storage and retrieval. This is where the index comes into play. The index is another software tool, the one sitting just behind that search box you’re inputting your query into. Internally, the index is just creating very large lists of specific record elements from database. Since it’s not working with whole records, it can search much more quickly.

And there you have it: the search box sends your query to the index. The index matches your query to a set of records or data in the database, and the database serves that data back you as the results.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: