Data Model
Overview
The adapter dynamically retrieves notes and views from your database and models them as tables and views. notes are modeled as tables. views are modeled as views.
Tables, Views, Columns and Stored Procedures
Simple and Display Names
The adapter supports options for controlling how tables, views, and columns are named:
Note Metadata
In addition to the items defined on each note, exposes metadata about each note that the adapter maps to special columns. These columns are:
- unid The unique note identifier, which identifies this specific note across all databases on the server. This is available in all tables and views.
Note that some column names will be different when UseSimpleNames is enabled because they can contain special characters.
Null Values
does not have a direct equivalent of the SQL NULL value. The adapter reports NULL values for columns in these scenarios:
- When an item is not set on a note. In formulas, this is equivalent to @IsAvailable(item) = 0.
- When a single-valued item on a note is the empty text value. In formulas, this is equivalent to @IsNull(item) = 1. Here, a single-valued item is an item on the base table or view where the adapter did not find any multi-value entries during type detection.
Tables
Available tables are listed using System Tables queries.For example:
SELECT * FROM sys_tables WHERE TableName = 'Person'
Views
Available views are listed using System Tables queries.For example:
SELECT * FROM sys_tables WHERE TableName = '($Account)'
Columns
Available columns on tables and views are listed using System Table Columns queries.For example:
SELECT * FROM sys_tablecolumns WHERE TableName = 'Person'
Stored Procedures
Stored procedures allow you to execute operations to Attachments can be manipulated via the DownloadAttachment, UploadAttachment, and RemoveAttachment stored procedures.