Types

The database understands your domain.

RedDB ships with 48 built-in types so the app does not parse, normalize and revalidate every IP, coordinate, email, money value, timestamp or cross-model reference.

Declare

Domain types are first-class columns.

CREATE TABLE hosts (

ip IpAddr,

cidr Cidr,

owner Email,

location GeoPoint,

monthly_cost Money,

service_ref TableRef

) WITH CONTEXT INDEX ON (ip, owner);

Network
IpAddr · Ipv4 · Ipv6 · MacAddr · Cidr · Subnet · Port
Geo
Latitude · Longitude · GeoPoint
Identity
Uuid · Email · Url · Phone · Semver
Money
Currency · AssetCode · Money · Decimal
Visual
Color · ColorAlpha
Temporal
Timestamp · TimestampMs · Date · Time · Duration
Refs
NodeRef · EdgeRef · VectorRef · RowRef · KeyRef · DocRef

Validate

Bad data stops at the engine. Not three services in.

insert typed values INSERT INTO hosts (ip, cidr, owner, location, monthly_cost, service_ref) VALUES ('10.0.0.1', '10.0.0.0/24', 'alice@co.com', '-23.550520,-46.633308', MONEY('USD', 1299, 2), 'services');
invalid values fail at write INSERT INTO hosts (ip, owner) VALUES ('not-an-ip', 'alice'); -- rejected before the record is persisted
query output shape
{
  "ok": true,
  "query": "SELECT ip, owner, location, monthly_cost, service_ref FROM hosts",
  "mode": "sql",
  "capability": "table",
  "statement": "select",
  "engine": "runtime-sql",
  "record_count": 1,
  "result": {
    "columns": ["ip", "owner", "location", "monthly_cost", "service_ref"],
    "records": [{
      "values": {
        "ip": "10.0.0.1",
        "owner": "alice@co.com",
        "location": "-23.550520,-46.633308",
        "monthly_cost": { "asset_code": "USD", "minor_units": 1299, "scale": 2 },
        "service_ref": "services"
      },
      "nodes": {},
      "edges": {},
      "paths": [],
      "vector_results": []
    }]
  },
  "selection": { "scope": "any" }
}

Gains

What teams stop writing once types live in the engine.

→Less app code
No custom parsers for IP, email, CIDR, money, geo and refs in every service.
→Bad data stops early
Validation happens before persistence, so downstream queries do not inherit malformed values.
→Better queries
The engine can route typed values into geo, network, ref and semantic operations.
→Cleaner JSON
Clients get predictable JSON shapes for values like Money, vectors and refs.

Try the typed surface.

Free nano database, no credit card. Self-host under BSL 1.1 or managed Cloud — same engine, same file format.