Skip to content

Database

Menu: Database group in the left sidebar (must be enabled in Edit Menu)
Route prefix: /_Admin/database/...?SiteId={siteGuid}

The Database group manages multiple data stores within a site: IndexedDB dynamic tables, table relations, key-value storage, and browsing and data maintenance for external SQLite / MySQL / SQL Server tables. SQL Logs shows SQL records produced by scripts and the admin backend. Scripts access these stores uniformly through k.DB (for SQLite see k.DB.sqlite).

Difference from Content

DatabaseContent → Content
ModelCustom table schemas, KV, external DB tablesContent types + content folders
Typical useBusiness tables, cache keys, integrating existing SQL databasesCMS entries bindable to pages
APIk.DBk.content

The two can be used together; do not treat them as one modeling system.

Advanced menu

The Database group and its sub-items are marked advanced in Edit Menu. If they are not checked, this group does not appear in the left sidebar.

How to Open

  1. In Edit Menu, check Database and the sub-items you need.
  2. Expand Database in the left sidebar.
MenuRoutePermission (feature)Doc
IndexedDB Tables/database/tabledatabaseIndexedDB tables (this section)
IndexedDB Table Relations/database/table-relationtableRelationTable relations
Key-Value Storage/database/key-valuekeyValueKey-value storage
SQLite Tables/database/sqlite-tabledatabaseSQLite tables
MySQL Tables/database/mysql-tabledatabaseMySQL tables
SQL Server Tables/database/sqlserver-tabledatabaseSQL Server tables
SQL Logs/database/sql-logsdatabase·logSQL logs

Development reference (KScript API)

MenuAPI doc
IndexedDB tablesk.DB.indexedDb
SQLite / MySQL / SQL Server tablesk.DB · k.DB.sqlite
Key-value storagek.DB (KV APIs; see child doc)
SQL logsRead-only observation; no dedicated k.* CRUD

Edit routes without sidebar menu items

The following pages are opened from table lists. Breadcrumbs still belong to the corresponding table-type menu (dbType query parameter highlights IndexedDB / SQLite / MySQL / SQL Server):

RouteDescription
/database/table/columnsEdit table columns (column definitions)
/database/table/dataBrowse and filter table data
/database/table/edit-dataCreate or edit a single row

Deep-link examples:

text
/_Admin/database/table/columns?SiteId={siteGuid}&id={tableId}&dbType=IndexedDb
/_Admin/database/table/data?SiteId={siteGuid}&id={tableId}&dbType=Sqlite

dbType values match the admin (e.g. IndexedDb, Sqlite, Mysql, SqlServer); confirm in the address bar.

Suggested reading order

If you are modeling site data from scratch, a common order is:

  1. IndexedDB tables — default dynamic tables within the site
  2. Table relations — multi-table associations (requires existing IndexedDB tables)
  3. Key-value storage — simple KV
  4. SQLite / MySQL / SQL Server — read as needed depending on external database integration
  5. SQL logs — troubleshooting and auditing
DocDescription
Site admin menu overviewFull menu tree
DevelopmentCalling k.DB from Code
k.DBScript API
k.DB.sqliteSQLite queries and table operations