What traits (subdocuments) are and how to leverage them

What traits (subdocuments) are and how to leverage them

Traits are composable multi-property data structures with multiplicity and cardinalities, reusable across your data model.

When you're challenged with messy data and a complex taxonomy, you might want to leverage reusable data structures. Don't worry, traits are here to help you do exactly that! The video below explains why traits (TerminusDB subdocuments) are important, what they are, and how to use them effectively.


In just over 2 minutes, you'll get to know how to leverage reusable multi-property data structures in JSON-LD documents with real-life examples. From flying capabilities of birds (sorry, penguins!) and airplanes; to creating reusable flexible postal address data structures for websites and logistics data. 

One of the challenges you might face when building your data taxonomy is property inheritance. DFRNT allows you to model your data structures separately and reuse them as properties for different types.

It's like using composable data structures in modern programming languages like Rust, but you don't need to be a programmer or a semantic data engineer to leverage them. To recap, the DFRNT "traits" are known as subdocuments in the TerminusDB data products.

The video also shows how you can add cardinalities and multiplicity constraints to your properties for even more flexibility.

    • Related Articles

    • Custom class metadata configuration

      Colours, link directions, class labels, the property display order can be altered by setting custom class metadata. DFRNT provides a special section called "metadata" to define custom behaviours for types and traits. Although these behaviours cannot ...
    • Use TerminusCMS data products in DFRNT

      Additionally to DFRNT hosted data products, you can connect and collaborate directly on data products hosted at TerminusCMS from DFRNT, using TerminusDB API keys. DFRNT.com helps you manage data products that are either hosted in DFRNT through the ...
    • Overview of DFRNT data modelling

      The data model in DFRNT data products follows the TerminusDB graph metamodel 1:1, and enables easy data modelling and advanced visualisation The data modelling capabilities of DFRNT.com involves five categories of data structures: Records, ...
    • How can I import data from Excel?

      You can import data from Excel using the "Add many records" function in a type view, with tabular data. To help you structure array data in Excel, here is a sample function to create a JSON list from a new-line-separated cell. Swap the semicolons, ...
    • How to get started with the Logical Studio?

      With the Logical Studio, you setup a branch in your data product for saved and reusable logic blocks. When you start the Logical Studio for the first time, it presents you a guide for setting up a new branch (data workspace) with a specific logic ...