Identify and standardize all instances of database denormalization #6898

Open
opened 2025-12-29 19:46:30 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Aug 29, 2022).

Proposed Changes

A new set of utilities was introduced under #9102 to better facilitate the caching of statistical data based on foreign key relationships. Currently, these are employed only for some fields on the CableTermination model, but they can be readily used elsewhere. This issue seeks to track the identification of such uses for the purposes of standardizing how we denormalize in NetBox.

Current and future instances of denormalization are tracked below:

Justification

Moving to a standardized denormalization implementation will ease long-term maintenance and reduce the likelihood of introducing new bugs.

Originally created by @jeremystretch on GitHub (Aug 29, 2022). ### Proposed Changes A [new set of utilities](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/denormalized.py) was introduced under #9102 to better facilitate the caching of statistical data based on foreign key relationships. Currently, these are employed only for some fields on the CableTermination model, but they can be readily used elsewhere. This issue seeks to track the identification of such uses for the purposes of standardizing how we denormalize in NetBox. Current and future instances of denormalization are tracked below: * circuits.Circuit: `termination_a`, `termination_b` * dcim.Interface: `wireless_link` * #6347 * #7845 * #10197 ### Justification Moving to a standardized denormalization implementation will ease long-term maintenance and reduce the likelihood of introducing new bugs.
adam added the type: housekeepingnetboxstatus: backlog labels 2025-12-29 19:46:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6898