Guides

Anatomy of a record

A record is the core unit of data within the BAQ network. Every record exposes a set of properties that inform servers on what they should do with it. This is an overview of these properties at a high level.

See the record reference­ for more technical details.

Records can reference other objects within the BAQ network:

  • Tags : Plain strings.

  • Blobs : Opaque binary objects (images, videos…).

  • Records : Other BAQ records.

  • Entities : Other BAQ users.

Link are used to define relationships between records. They can be used to enable detailed queries, and existential links make it possible to cascade-delete records.

A record is identified by its author and id.

  • The author is a link to the user that originally created the record. They remain the source of truth for the record, even if other people update it.

  • The id is a unique identifier within the scope of the author.

A record’s schema­ is defined by its type, which is a link to a Type record­.

Some types are built-in to implement some of the core platform features­, but anyone can create and publish their own types to best represent the data model needed for their apps.

The permissions object contains links­ to other entities to give them read/write access to the record. It also instructs servers on where to propagate it when published. Records generally fall into one of three categories:

  • Private record : Only accessible to the original author.

  • Shared record : Accessible to a small set of entities.

  • Public record : Visible to everyone.

Records are versioned: updating a record creates a new record version.

Each record version is immutable and uniquely identified by its version.hash property. New record versions must explicitly link to the parent version they update.

New record versions may be created by users other than the original author, provided they have permission to do so.

Every record includes 4 timestamps:

  • created_at : When it was initially created according to the author.

  • received_at : When it was received by the server.

  • version.created_at : When this version was created (author).

  • version.received_at : When this version was received by the server.

These can all be used as sort property when listing records.

© 2024 Quentez