Skip to content

Device Capability Database

A selected collection of machine-readable device descriptions lets software use shared capability names to adapt commands and output to different device types.

Version
v1 · 2026-10-17 · History
Domain-specific #
14119
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomains
Operating Systems, Device Interoperability → Computer Science & Software Engineering
Aliases
Device capability description database

Core Idea

A device capability database lets one program work with different kinds of devices by reading selected descriptions instead of building every device detail into the program. A supplied terminal type or configured printer queue chooses a description. The program asks for named capabilities, reads their stored values, and uses those values to adapt its output.

Terminfo stores terminal descriptions and control capabilities that software such as tput can request.[1][2] In legacy CUPS printing, a selected PostScript Printer Description (PPD) file describes printer options and commands that the print system can use.[3][4][5] The shared idea is selected description → named lookup → device-specific action. The database does not detect the physical device; another setting supplies the selector.[2][5]

This is a kind of Lookup Table. Its entries associate supplied device and capability keys with prepared values. It adds a device-control vocabulary and software that acts on the retrieved values. A general table of numbers can be a Lookup Table without being a device capability database.

How would you explain it like I'm…

The Machine Card Book

Imagine a big book of cards, one card for each kind of printer or screen. Each card says what that machine can do, using the same words on every card. A computer program is told which card to read, then talks to the machine the right way. But a card can only list things the program already knows how to understand.

The Device Fact Book

Different printers and text screens (terminals) need different commands. Instead of writing all those details into every program, a Device Capability Database stores a description for each type of device, using a shared list of capability names. The program is told which device type it's using, looks up that description, and changes its commands to fit. Examples are terminfo for terminals and PPD files for printers. The database doesn't figure out by itself what's plugged in, and adding a new description only works if the new device fits what the program already understands.

Keyed Device Capability Records

A Device Capability Database is a machine-readable set of descriptions of device types, used so that application code doesn't have to hard-code each device's quirks. The program receives a selector — say, the configured terminal type or printer queue — reads the matching record through a shared vocabulary of capability names, and adapts its output. Terminfo stores terminal descriptions; in CUPS, a printer queue can point at its own PostScript Printer Description (PPD) file. The store doesn't have to be one central table, and it doesn't detect hardware on its own; the surrounding configuration supplies which device it is. There's also a limit: a record can only express capabilities the format and the client program understand, so some printer features need extra filters or files beyond the PPD.

 

A Device Capability Database is a machine-readable collection of device-type descriptions that decouples device-specific facts from application logic. A consuming program is given a selector identifying a terminal type or configured printer, retrieves the corresponding description, and interprets it through a shared vocabulary of capability names to adapt its commands or output. Terminfo, described by ncurses as a terminal capability database, and PPD files, described by CUPS as per-printer capability records, are instances of the same scheme. Storage may be a database of descriptions or individual per-device files selected by a queue; what matters is keyed, machine-readable facts delivered to a client. Identification of the device comes from surrounding configuration, not from the description store itself. The decoupling is bounded by the format-client contract: only capabilities expressible in the format and understood by the client can be conveyed, and CUPS distinguishes PPD-defined commands from advanced features needing filters or supporting files. So adding a record extends an existing client only when the new device fits that contract.

What It Is Not

A device capability database is not a device driver by itself. The description holds facts and commands; a client, scheduler, or filter must interpret them. CUPS documents advanced printer features that need filters or other supporting files beyond a PPD.[4]

It is not an automatic hardware detector or a promise that any new device works by adding one file. A terminal type can be supplied through TERM or tput -T, and a CUPS queue can select a PPD.[2][5] The existing client must understand the capability name and value. PPD printing is a documented legacy example: OpenPrinting says CUPS printer-driver support was deprecated beginning with CUPS 2.3.[6]

It is not required to be one physical table. Terminfo uses a database of terminal descriptions; a set of selected PPD files can play the same collection role for printers.[1][3]

Scope of Application

The pattern applies when software must issue different operations to several device types through a common interface. A terminfo client selects a terminal description and can retrieve Boolean, numeric, or string capabilities, including control strings.[1][2] A legacy CUPS print path selects a printer description and uses PPD options and commands, sometimes together with filters.[3][4][5]

A stored description must be selected and consumed. A program with only hard-coded branches may adapt to devices, but it lacks this database-mediated form. A passive capability file that no client reads does not adapt output.

Clarity

To recognize the pattern, ask: Who supplies the device type? Where are its facts stored? Which names can the client request? What action uses the answer? These questions separate the stored description from device discovery and executable driver logic.

Also distinguish an absent known capability from an unsupported new feature. ncurses tiget* functions document return values for missing or canceled capabilities, and the legacy CUPS ppdFindOption lookup can return NULL when an option is not found.[7][8] Those are lookup outcomes. A capability outside the client's vocabulary may require changed software, not merely a new record.

Manages Complexity

Named capability records let one client reuse its logic across device types. Different terminal control strings can live under common terminfo names; printer-specific options can live in PPDs.[1][3] A new description can extend a client when its existing names and interpretation code already cover the needed behavior.

That condition matters. A wrong selector applies the wrong facts. An inaccurate record can cause wrong output. New hardware may require a new name, a new interpretation rule, or an extra filter. OpenPrinting identifies PPD limits in representing modern printer capabilities and dynamic state.[6]

Abstract Reasoning

Trace supplied type → selected description → named capability → retrieved value → adapted operation. If the client never consults the record, remove the database from the explanation. If changing only the record cannot express or execute a new operation, the extension requires software work as well.

The same reasoning separates two errors: choosing the wrong description and storing a wrong value in the right description. Both can produce incorrect commands, but they require different repairs.

Knowledge Transfer

Terminfo and legacy PPD printing use unlike names, formats, and operations. Their common structure is a selected external description, a vocabulary shared by a client, and output adapted from retrieved values.[1][3][4] Transfer that role map, not terminal escape codes or printer option names.

The broader Lookup Table genus supplies prepared associations and a lookup rule; this child adds device types, capability meanings, and an operative client. Indirection is a related Prime because the named lookup mediates device-dependent behavior. Neither every lookup table nor every device driver has this identity.

Examples

Terminal control with terminfo. Terminfo holds named capabilities for terminal types. A script using tput selects a terminal through TERM or -T and asks for a capability such as a control string.[1][2] Mapped back: supplied terminal type = selector; terminfo record = stored description; capability name = lookup key; tput = client; resulting control sequence = adapted operation. The record does not identify attached hardware.

Legacy printer description with CUPS. A CUPS queue can select a printer model or PPD file. The PPD describes options and commands; the print system uses it with its scheduler and, when needed, filters to prepare output for that printer.[5][3][4] Mapped back: configured queue = selector; PPD = stored description; option keywords = lookup names; CUPS print path = client; printer-specific output = adapted operation. A PPD alone may not implement advanced features, and this is a legacy driver architecture.[4][6]

Relationships to Other Abstractions

Local relationship map for Device Capability DatabaseParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Device CapabilityDatabaseDOMAINDomain-specific abstraction: Lookup Table — is a kind ofLookup TableDOMAIN

Current abstraction Device Capability Database Domain-specific

Parents (1) — outgoing typed relations

  • Device Capability Database is a kind of Lookup Table Domain-specific

    A Device Capability Database is a Lookup Table whose stored keyed associations describe device capabilities and commands that a client uses to adapt output.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Device Capability Database sits in a sparse region of the domain-specific corpus (99th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Unclustered & Miscellaneous (3155 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-11-14

References

[1] Zeyd M. Ben-Halim, Eric S. Raymond, and Thomas E. Dickey, “terminfo(5) terminal capability database,” ncurses 6.6 manual, patch 20260919, https://invisible-island.net/ncurses/man/terminfo.5.html (original implementer reference, full HTML inspected; DESCRIPTION, Entry and Capabilities Syntax, Standard Capabilities, and Preparing Descriptions). registry ↩a ↩b ↩c ↩d ↩e ↩f

[2] ncurses project, “tput(1) initialize a terminal, exercise its capabilities, or query terminfo database,” ncurses 6.6 manual, https://www.invisible-island.net/ncurses/man/tput.1.html (original implementer reference, full HTML inspected; DESCRIPTION, -T option, TERM environment, and EXAMPLES). registry ↩a ↩b ↩c ↩d ↩e

[3] OpenPrinting/CUPS, “CUPS PPD Extensions,” https://www.cups.org/doc/spec-ppd.html (official format specification, full HTML inspected; introduction and option-command examples). registry ↩a ↩b ↩c ↩d ↩e ↩f

[4] OpenPrinting/CUPS, “Developing PostScript Printer Drivers,” https://www.cups.org/doc/postscript-driver.html (official implementer guide, full HTML inspected; Printer Driver Basics and Creating New PPD Files). registry ↩a ↩b ↩c ↩d ↩e ↩f

[5] OpenPrinting/CUPS, “lpadmin(8),” https://www.cups.org/doc/man-lpadmin.html (official command reference, full HTML inspected; -m model and -P ppd-file printer queue selection options). registry ↩a ↩b ↩c ↩d ↩e

[6] OpenPrinting, “Printer Applications and Printer Drivers,” https://openprinting.github.io/cups/drivers.html (original project documentation, full HTML inspected; deprecation statement, PPD expressivity limits, and replacement architecture discussion). registry ↩a ↩b ↩c

[7] ncurses project, “curs_terminfo(3x) curses interfaces to terminfo database,” ncurses 6.6 manual, https://invisible-island.net/ncurses/man/curs_terminfo.3x.html (original implementer reference, full HTML inspected; Terminal Capability Functions gives type-error versus absent/canceled return values for tigetflag, tigetnum, and tigetstr). registry ↩

[8] OpenPrinting/CUPS, “PPD API (Deprecated),” https://www.cups.org/doc/api-ppd.html (official legacy API reference, full HTML inspected; ppdFindOption returns a pointer or NULL when an option is not found). registry ↩