Skip to main content

Schema prototypes

Discover the prototype schemas collection are created from

Each collection is based on a schema prototype that provides default properties appropriate to the type of data held in the collection.

info

Vault includes PERSONS and DATA schema prototypes. The Vault roadmap includes support for more schema prototypes.

PERSONS schema prototype

A PERSONS schema defines objects that contain people's information, such as name, home address, SSN, email address, phone number, etc. An object in a PERSONS collection can own objects in DATA collections.

The PERSONS schema prototype includes these built-in properties:

  • id
  • _owner_id
  • _owner_collection
  • _tenant_id
  • _creation_time
  • _modification_time
  • _expiration_time
info

_owner_id and _owner_collection are reserved for future use. You cannot define ownership of a PERSONS collection object.

DATA schema prototype

A DATA schema prototype defines objects that contain information associated with a person, such as credit card details, financial transactions, etc. An object in a DATA collection is usually owned by an object in a PERSONS collection.

The DATA schema prototype includes these built-in properties:

  • id
  • _owner_id
  • _owner_collection
  • _tenant_id
  • _creation_time
  • _modification_time
  • _expiration_time

Defining DATA object ownership

The built-in _owner_id and _owner_collection properties enable ownership of a DATA collection object by a PERSONS collection object to be established. This is done by settings the _owner_id of the owned DATA collection object to the ID of the owner PERSONS collection object and _owner_collection to the name of the collection containing the owner object. If _owner_id is defined, then _tenant_id is set to the owner's _tenant_id.

For exanple, this object (with some properties omitted for brevity) from a collection of credit card data is owned by a object in the customer collection with the ID ab3d5be0-ffde-4a8c-983a-f79dd5d34e17:

{
"_owner_id": "ab3d5be0-ffde-4a8c-983a-f79dd5d34e17",
"_owner_collection": "customer",
"cvv": "123",
"number": "1234123412341234",
}