Skip to content

Code Notebook Kernel

Description

A Notebook is a group of Cells. A kernel is a computational engine that executes the code contained in a notebook cell. Each notebook is associated with a kernel of a specific programming language or code transformer which can interpret code and produce a result. For example, a SQL notebook might use a SQLite kernel for running SQL code and an AI Prompt might prepare AI prompts for LLMs.

Table Definition
CREATE TABLE "code_notebook_kernel" (
"code_notebook_kernel_id" VARCHAR PRIMARY KEY NOT NULL,
"kernel_name" TEXT NOT NULL,
"description" TEXT,
"mime_type" TEXT,
"file_extn" TEXT,
"elaboration" TEXT CHECK(json_valid(elaboration) OR elaboration IS NULL),
"governance" TEXT CHECK(json_valid(governance) OR governance IS NULL),
"created_at" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
"created_by" TEXT DEFAULT 'UNKNOWN',
"updated_at" TIMESTAMP,
"updated_by" TEXT,
"deleted_at" TIMESTAMP,
"deleted_by" TEXT,
"activity_log" TEXT,
UNIQUE("kernel_name")
)

Columns

NameTypeDefaultNullableChildrenComment
code_notebook_kernel_idVARCHARfalsecode_notebook_cellcode_notebook_kernel primary key and internal label (not a ULID)
kernel_nameTEXTfalsethe kernel name for human/display use cases
descriptionTEXTtrueany further description of the kernel for human/display use cases
mime_typeTEXTtrueMIME type of this kernel’s code in case it will be served
file_extnTEXTtruethe typical file extension for these kernel’s codebases, can be used for syntax highlighting, etc.
elaborationTEXTtruekernel-specific attributes/properties
governanceTEXTtruekernel-specific governance data
created_atTIMESTAMPCURRENT_TIMESTAMPtrue
created_byTEXT’UNKNOWN’true
updated_atTIMESTAMPtrue
updated_byTEXTtrue
deleted_atTIMESTAMPtrue
deleted_byTEXTtrue
activity_logTEXTtrue{“isSqlDomainZodDescrMeta”:true,“isJsonSqlDomain”:true}

Constraints

NameTypeDefinition
code_notebook_kernel_idPRIMARY KEYPRIMARY KEY (code_notebook_kernel_id)
sqlite_autoindex_code_notebook_kernel_2UNIQUEUNIQUE (kernel_name)
sqlite_autoindex_code_notebook_kernel_1PRIMARY KEYPRIMARY KEY (code_notebook_kernel_id)
-CHECKCHECK(json_valid(elaboration) OR elaboration IS NULL)
-CHECKCHECK(json_valid(governance) OR governance IS NULL)

Indexes

NameDefinition
sqlite_autoindex_code_notebook_kernel_2UNIQUE (kernel_name)
sqlite_autoindex_code_notebook_kernel_1PRIMARY KEY (code_notebook_kernel_id)

Relations

er