User Tools

Site Tools


kb:bestpractices:codingconventions:database

This is an old revision of the document!


08 Databases

Architecture

  • Wrap each query in a separate SubVI
    • this allows for easy reuse
    • add documentation to describe the returned values
    • optional: convert the returned 2d-array of strings into a 1d-array of typedef'ed cluster
  • A DB connection is like a shared resource that cannot be used in parallel. (also true for SQLite)
    • use one db connection instance per consumer to avoid blocking

Design

  • Usual default columns for tables include
    • id
    • created_on
    • created_by
    • changed_on
    • changed_by
    • status
      • 0 .. disabled
      • 1 .. active

The HSE Way of Working:
A set of guidelines that recommend programming style, better practices, and methods for all our LabVIEW projects. We ask all our peers to follow these guidelines to help improve the readability of our shared source code and make software maintenance easier.

kb/bestpractices/codingconventions/database.1791292841.txt.gz · Last modified: 2026/10/06 13:20 by joerg.hampel