Getting started with Data Model & Catalogs

Article contents



In the Data Model & Catalogs page the user can create and maintain data from all applications. The Data Model offers a unique view of all Classes and Attributes (data structure) in a single place, so that you can easily re-use some data elements and avoid data duplication.

When you access the Data Model & Catalogs page, you will be asked to select a model type to edit or to add if you are here for the first time:

What is a Data Model, actually?

Look at a Data Model like, let’s say, you would look at your average car. This car has multiple properties including Class, Color and Power. In the Data Model, you can set the car to be the Class and its other properties, individually, can be car Color and car Power. These will be the Attributes of the main Class named Car. And these Attributes have values, such as carColor:blue, carClass:suv, carPower:100.

What about Classes?

A Class represents a group of objects that have a common state and behavior.

You can think of a Class as a blueprint for an object in an object-oriented system. In an UML (Unified Modeling Language), a Class is a kind of classifier. For example, Volkswagen, Toyota, and Ford are all cars, so you can represent them using a Class named Car.

Each specific type of car is an instance of that Class, or an object. A Class may represent a tangible and concrete concept, such as an invoice; it may be abstract, such as a document or a vehicle (as opposed to an invoice, or a motorcycle greater than 1000 cc), or it may represent an intangible concept such as a high-risk investment strategy.

How do I structure (write) a Class?

The Classes are represented by the rectangular box divided into compartments. The first compartment contains is the Class name.

When writing the Class name:

  • Start with a capital letter

  • Center the name in the top compartment

  • Don’t use spaces or CAPS

Details of a Class (the color of a car, the number of sides in a shape, etc.) are represented as Attributes. Attributes can be simple primitive types (integers, floating-point numbers, etc.) or relationships to other, complex objects.

The Attributes are represented by a rectangular box that can be added in a Class.

Writing an Attribute

  • Start with lowercase letter

  • Don’t add spaces between the words of the same Attribute name

  • Write the next word with capital letters (e.g. customerDetails or contactInformation)

For Attributes, the following data types are used:

Boolean

A logical data type that can have only the values true or false.

String

A sequence or characters used to represent text.

Date

A data type that is representing a date (dd:mm:yyyy).

Integer

This data type denotes an integer number, positive or negative. An integer consists of one or several decimal digits, 0 to 9.

Decimal

A data type that represents non-repeating decimal fractions without rounding them up.

Attachment

It’s a data type that allows multi-valued fields to be saved in an attachment.

Time

A data type that is representing time (hh:mm:ss).

DateTime

a data type that is representing both date and time (dd:mm:yyyy hh:mm:ss).

Note: To represent a relationship between Classes, the Classes can be selected from the list of values when adding a new Attribute.

Attribute details

Each Attribute has four details that can be set up: 

  • When one Attribute is checked as “Is list”

That means that Attribute will return the whole list of Attributes of the Class chosen as the Attribute type/value.

E.g. if we have an Attribute named “Products” and as its type we choose “Customer” Cass and check “Is list”, then the Attribute Products will return all the Attributes from the Class Customer (e.g customer id, customer name, customer address, customer contact details etc). “Is list” can be used to map Segment object types in User Interfaces. "Is list" is used for Attributes, containing a Class from a Segment object in the UI.

  • When one Attribute is checked as “Is Indexable”

That means that this Attribute can be used further as a search parameter.

  • When one Attribute is checked as “Blockchain Ready”

Data can be sent to the Blockchain via a smart contract process.

Note: This also applies to Classes.