API Maker

The backend engine for the AI era

Data typesEpisode 71 5:08 11 chapters October 2026

Vectors, JSON, Bytes, Shapes and Intervals Through One REST API, on Six Databases

Every column type of MongoDB, MySQL, MariaDB, PostgreSQL, SQL Server and Oracle goes through the same APIs as plain JSON: AI embeddings as lists of numbers, JSON as JSON, bytes as one Buffer object, shapes as GeoJSON, intervals as objects. Shown on MariaDB 12.1 vectors, MongoDB BSON vectors and PostgreSQL.

In the playlists The complete course Databases & schemas

Chapters

What you will learn

  • A table of MariaDB with VECTOR, JSON, bytes and a point, and the schema API Maker makes of it
  • Saving and reading the row: what comes back, and why 0.12 becomes 0.11999999731779099
  • What each database reads vectors, JSON, bytes and shapes as
  • BSON vectors of MongoDB read as numbers
  • Intervals, circles, arrays and jsonb of PostgreSQL
  • The same values from g.sys.db in Python and Go
  • What to know: sizes, old schemas, and where similarity search belongs
In the docsData types
Transcript686 words · click a time to play from there

Intro

Vectors, JSON, bytes, shapes and intervals. Every column type of the six databases goes through the same APIs, as plain JSON : the vectors of AI models too, stored and read like any other value.

Every driver, its own way

Each database driver reads these types its own way : a vector as raw bytes, JSON as a string to parse, bytes in base64, by hand, and a point in the format of each database. With API Maker, a vector is a list of numbers, JSON is JSON, bytes are one Buffer object, and a shape goes in as GeoJSON. In this video : a table with the new types, its schema, a row saved and read back, what each database gives back, vectors on MongoDB, shapes and intervals on PostgreSQL, the same from your code, and good to know.

A table with the new types

Calm Home adds AI to its shop. On MariaDB, the marketing database gets a table of product profiles. An embedding : the vector an AI model makes of each product, to find similar ones. Real models give hundreds of numbers ; four here, to read them. Its details as JSON, the perceptual hash of its photo, eight bytes, its pick-up point, and plain notes.

Its schema

In the panel : Instance API. The instance mariadb, its database marketing, the new table, and Add Schema, made from the table. The vector is a list of numbers. JSON, the bytes and the point are strings that take objects. On MariaDB, JSON is a long text : its field gets the length of one. Save.

A row, saved and read back

API Testing. mariadb, marketing, product profiles, Save single or multiple. The row, as plain JSON : the vector as a list, the details as an object, the hash as a Buffer object, and the pick-up point as GeoJSON. Send : two hundred and one, and the row as the database keeps it. The numbers of a vector are floats of four bytes : 0.12 comes back as 0.11999999731779099. On MariaDB, JSON comes back as its text.

The bytes, as the same Buffer object, and the point, as x and y. A list sent to a text column which is not JSON is refused, the field named : nothing was saved.

Every database

Every database, the same way. Vectors : MySQL 9, MariaDB 11.7, SQL Server 2025, Oracle 23ai, and pgvector on PostgreSQL. JSON comes back as JSON on MySQL, PostgreSQL, SQL Server 2025 and Oracle 21c. Bytes are a Buffer object everywhere. And a shape is read in the form of the driver of each database.

Vectors on MongoDB

On MongoDB, a pipeline of embeddings writes BSON vectors, binary data of subtype nine, as the vector search of Atlas stores them. In API Testing, mongodb, catalog, product embeddings, Get all. Send : each vector is read as its numbers.

Shapes and intervals on PostgreSQL

On PostgreSQL, the delivery zones of the shop. Save single or multiple. A lead time as an interval object, the area as a circle, the postcodes as an array, and the rules as jsonb. Send : the interval comes back as days and hours, the circle as x, y and radius, the array as a list, and jsonb as JSON.

From your code

From your code, the same values. g.sys.db saves them in every language : in Python, and in Go, with plain lists and maps. They are read back in the same forms.

Good to know

Good to know. Bytes, intervals and the large objects of Oracle get no length in the schema. A vector of the wrong size is refused by the database : send as many numbers as the column has. Schemas made before these types keep their old fields : generate them again. And API Maker stores and reads vectors : the search by similarity is the work of your database, in a custom API.

Recap

To sum up. A vector is a list of numbers, floats of four bytes. JSON is JSON, a text on MariaDB. Bytes are a Buffer object, shapes and intervals plain objects. The same values in the generated APIs, the schema APIs and your code. Next : the schemas of your tables, and the rules they check. API Maker. Build faster, spend smarter, deliver better.