# SQL databases as documentation repositories

## Definition

In the case of a content management system (CMS) such as Drupal, Joomla, or WordPress, the repository is an SQL database. It maintains a history on a per-article basis, but does not support text search and replacement across all content.

## Trade-offs

This may justify choosing to manage the underlying content of the CMS in the form of text files. Static site generators work this way: content lives as text files in a [Git repository](https://docs.redaction-technique.org/en/tech-writing-process/git-from-file-to-content/), the published site is a build product, and search-and-replace across all content is an ordinary operation on files.

## A database as a source of data

A database can still be the right *source of data* for documentation, for example product names and versions, as long as the text itself stays in files. For an example of querying an SQL database to populate documentation automatically, see [automatically insert SQL data into a reStructuredText file](https://docs.redaction-technique.org/en/tutorials/auto-insert-sql-data-restructuredtext/).

## Related articles

- [Repository](https://docs.redaction-technique.org/en/tech-writing-process/repository/)
- [A single repository?](https://docs.redaction-technique.org/en/tech-writing-process/single-repository/)
- [CMS: workflow as a bonus, but reliability to be tested](https://docs.redaction-technique.org/en/tech-writing-process/cms-workflow-and-reliability/)

---

Source: https://docs.redaction-technique.org/en/tech-writing-process/sql-database/
