# Model application documents

**Applies to:** matched development servers and SDK source releases. The public APT baseline and newer clients expose different capabilities; check the [SDK guide](/docs/sdk-clients.html) before installing.

## Choose a key and table

A row is identified by its table and key. Use a stable application identifier, such as a customer ID, rather than deriving identity from mutable display names. Raw byte values and table rows occupy distinct key domains.

SMKV documents are flat typed rows: bytes, strings, signed 64-bit integers, floats, and booleans. This is not a MongoDB-compatible API. Nested JSON traversal and cross-row transactions are not implied.

## Write a complete row

Install the Python client from the matched source checkout:

```sh
python3 -m pip install ./python-smkv
```

With a local development node running:

```python
from smkv import Client

with Client("127.0.0.1:7379") as client:
    customers = client.table("customers")
    customers.put(b"customer-42", {
        "name": "Ada",
        "plan": "team",
        "seats": 12,
        "active": True,
    }, sync=True)
    print(customers.get(b"customer-42", columns=["name", "plan"]))
```

A put replaces the whole row. If you omit a field on replacement, it does not retain its old value. Explicit `sync=True` requests local durability; default asynchronous replication does not make that a durable acknowledgment from another node.

## Update a subset

Inside the same client context:

```python
customers.update(b"customer-42", {"seats": 15}, remove=["active"])
```

The update assigns `seats`, removes `active`, and preserves other columns as one row mutation. It is not an increment and requires an existing, unexpired row. A read-modify-write cycle across separate requests can race with another writer.

## Represent missing values

There is no stored null type. Omit or remove a column to represent absence. Missing projected fields are omitted from a returned row. Integers and floats have distinct types; a typed integer filter does not automatically match a float.

## Plan record limits

Table and column names are 1–64 UTF-8 bytes. A row has at most 64 columns. Encoded metadata, table names, database prefixes, and keys count against the corresponding size limits. Projections reduce response size but still read the full stored row; updates rewrite and replicate the full row.

Continue with [tables and scans](/docs/tables.html), [logical databases](/docs/databases.html), and [Python client errors](/docs/python-client.html).
