The Relational Database Pattern

A relational database structure organizes content as records that share the same fields, stored in tables where rows are individual records and columns are attributes. This pattern works best for large collections of fairly homogeneous content, where the same components need to be displayed in different ways across different pages, search results and product pages showing the same product data, for instance.

A database requires at least one field with a clearly distinguishable value for each record, and it isn't suited to heterogeneous content that lacks that kind of uniformity. Faceted metadata extends the database pattern further: facets are independent sets of categories that describe the same content from different angles, a recipe site, for example, might use facets for meal, course, cooking method, main ingredient, dietary restriction, and cuisine, letting users approach the same recipes from whichever angle matches their need.

The test for whether a database structure fits isn't how much content you have: it's whether that content is uniform enough to describe with the same set of fields.

Exercise

The scenario: Three content collections. Assess whether a database structure fits each one.

1. A recipe website with 5,000 recipes, each having consistent attributes: ingredients, cook time, cuisine, dietary tags, and ratings.
2. A company's "About Us" section, containing a mission statement, a leadership bio page, a company history timeline, and a careers page, four entirely different content types with no shared structure.
3. A university's faculty directory, where most entries have name, department, and office hours, but a growing number of faculty pages also include embedded video lectures, downloadable syllabi, and personal research blogs of wildly varying structure.