API Maker

The backend engine for the AI era

Data typesEpisode 71 5:43 11 chapters November 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
Transcript725 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. That includes the vectors of AI models, stored and read like any other value.

Every driver, its own way

Each database driver reads these types in its own way. A vector comes as raw bytes. JSON comes as a string to parse. Bytes need base64, by hand. And a point uses 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. It has an embedding: the vector that an AI model makes of each product, to find similar ones. Real models give hundreds of numbers. Here we use four, so you can read them. It has its details as JSON, the perceptual hash of its photo, eight bytes long, its pick-up point, and plain notes.

Its schema

In the panel, open Instance API. Pick the instance mariadb, its database marketing, and the new table. Click 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, so its field gets the length of one. Save it.

A row, saved and read back

Open API Testing. Pick mariadb, then marketing, then product profiles, and Save single or multiple. Type the row, as plain JSON. The vector is a list, the details are an object, the hash is a Buffer object, and the pick-up point is GeoJSON. Send. We get two hundred and one, and the row as the database keeps it. The numbers of a vector are floats of four bytes, so 0.12 comes back as 0.11999999731779099.

On MariaDB, JSON comes back as its text. The bytes come back as the same Buffer object, and the point comes back as x and y. A list sent to a text column that is not JSON is refused, and the field is named. Nothing was saved.

Every database

Every database works the same way. Vectors work on 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. They are binary data of subtype nine, the way the vector search of Atlas stores them. In API Testing, pick mongodb, then catalog, then product embeddings, and Get all. Send. Each vector is read as its numbers.

Shapes and intervals on PostgreSQL

On PostgreSQL, here are the delivery zones of the shop. Pick Save single or multiple. Type 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

Your code uses the same values. g.sys.db saves them in every language. Here it is 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, so 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, stored as floats of four bytes. JSON is JSON, and a text on MariaDB. Bytes are a Buffer object. Shapes and intervals are plain objects. And the same values work 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.