Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Question DB

Question DB is the database repository for the Question diagnostic tool and symptom tracker. It has two purposes:

  1. Define the data model and persistence contract for the Question application.
  2. Provide specific database implementations of that contract.

1. Data Model

Question DB uses a relational Entity–Attribute–Value (EAV) data model to support flexible, structured data while maintaining explicit relationships and constraints.

ER Diagram

High-Level ERD

A detailed version of the ER diagram, including table fields, data types, keys, and constraints, is located at docs/diagrams.

Table Descriptions

Primary Tables

Table Purpose/Description
projects Organize and separate data.
types Define classes that nodes can be assigned to.
nodes Represent the central data points of the application.
instances Represent occurrences of nodes.

Secondary Tables

Table Purpose/Description
type_list_items Define values that are allowed for the primary data points of nodes.
fields Define attributes for the secondary data points of nodes.
field_list_items Define values that are allowed for the secondary data points of nodes.
field_sub_list_items Define field list items that are subsets of other field list items.
node_data Store the values of a node's secondary data points (fields).
instance_fields Define attributes for the secondary data points of instances.
instance_list_items Define values that are allowed for the secondary data points of instances.
instance_sub_list_items Define instance list items that are subsets of other instance list items.
instance_data Store the values of an instance's secondary data points (instance fields).

2. Database Implementations

SQLite

The SQLite implementation provides a lightweight, file-based implementation of the Question DB persistence contract.

  • docs: SQLite-specific documentation, including setup notes.
  • migrations: Versioned scripts for evolving the schema over time.
  • scripts: Build and utility scripts, including the script that builds the SQLite database file.
  • sql/schema: Individual DDL scripts, one per table, defining the tables, keys, and constraints that make up the data model.
  • sql/schema.sql: A single combined schema file generated from the contents of sql/schema, used by the build script to create the database in one step.
  • sql/seed: Scripts for populating the database with sample or default data.
  • sql/queries: Common SQL queries for reading and writing Question DB data.
  • tests: Scripts for validating table constraints, triggers, and referential integrity.

About

Database repository for the Question diagnostic tool and symptom tracker.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors