Effective database design is crucial to mitigate code rot, which affects software over time. While traditional rules like database normalization are critical, lesser-known tips are equally important. Every table should have an ID field, typically an auto-incremented integer, to ensure clarity and facilitate indexing. Avoid using spaces and underscores in field names, as they complicate querying and introduce unnecessary confusion. By adhering to these small principles, one can maintain a clean and manageable database schema throughout its lifecycle.
Every table has an ID field that should be an auto-incremented integer value, with an index on the ID. Rarely should a multiple-field key be needed.
Never put spaces in table or field names. Spaces lead to using quotation marks, creating confusion when writing a query.
Collection
[
|
...
]