Database Model documentation
Welcome to the Database Model Documentation page. This resource is designed to help our partners, consultants, and admin users gain a clear understanding of the database structure used in our application. Whether you're generating custom SQL queries, integrating with other systems, or simply exploring the data architecture, this documentation will guide you through the essential components of our database model.
Spreadsheet Overview
To facilitate easy access to the database model, we've provided a comprehensive spreadsheet that details the structure of our database. This spreadsheet is the primary resource for understanding the various tables, columns, and relationships within the database.
How to Use the Spreadsheet
The spreadsheet is organized into several columns, each of which provides specific information about the database structure. Below is a brief overview of what each column represents:
TABLE_NAME
The name of the table within the database.COLUMN_NAME
The name of the column within the table.DATA_TYPE
The type of data stored in the column (e.g., VARCHAR, INT, DATE).DATA_LENGTH
The maximum length of the data in the column, particularly relevant for character data types.DATA_PRECISION
For numeric data types, this indicates the total number of significant digits.DATA_SCALE
Specifies the number of digits to the right of the decimal point for numeric data types.NULLABLE
Indicates whether the column can contain NULL values ('Y' for yes, 'N' for no).COLUMN_ID
The order of the column within the table, helping you understand its position.DEFAULT_LENGTH
The length of any default value assigned to the column, if applicable.DATA_DEFAULT
Any default value that will automatically be applied if no other value is provided.CONSTRAINT_TYPE
The type of constraint applied to the column (e.g., Primary Key, Foreign Key).CONSTRAINT_NAME
The name of the specific constraint applied to the column.CONSTRAINT_POSITION
If a constraint applies to multiple columns, this indicates the order of the column within that constraint.REFERENCED_TABLE
If the column is a Foreign Key, this column shows the name of the table it references.REFERENCED_COLUMN
The specific column in the referenced table that the Foreign Key points to.
Exploring Column Details
For each column name listed in the spreadsheet, hover over the header to see a tooltip with a detailed description. This additional information provides context, helping you understand the purpose and relationships of each column within the database model.
Practical Tips
Searching for Specific Tables or Columns: Use the spreadsheet's search functionality to quickly locate the table or column you're interested in.
Understanding Relationships: Pay special attention to the
CONSTRAINT_TYPE
,REFERENCED_TABLE
, andREFERENCED_COLUMN
columns to understand how different tables are related through primary and foreign keys.Referencing Data: When writing SQL queries, refer to the
DATA_TYPE
,DATA_PRECISION
, andDATA_SCALE
columns to ensure you’re using the correct data format.
https://docs.google.com/spreadsheets/d/1Cj3DOhFn3wX9mqVjjFE5HcyrrlJDPgfbjwa1675tk-c/edit?usp=sharing