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 is a Class?
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 a 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 to 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 a 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:
A logical data type that can have only the values true or false.
A sequence of characters used to represent text.
A data type that is representing a date (dd:mm:yyyy).
This data type denotes an integer number, positive or negative. An integer consists of one or several decimal digits, 0 to 9.
A data type that represents non-repeating decimal fractions without rounding them up.
It’s a data type that allows multi-valued fields to be saved in an attachment.
A data type that is representing time (hh:mm:ss).
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.
Each Attribute has four details that can be set up:
When one Attribute is checked as “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” Class and check “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). “List” can be used to map Segment object types in User Interfaces. "List" is used for Attributes, containing a Class from a Segment object in the UI.
When one Attribute is checked as “Searchable”
“Searchable” means the attribute is associated with an element of an Indexable column with the predefined index to access it. The Indexable types include types such as ARRAY and JSON.
The indexable extension provides a Column-like interface for any element of an Indexable typed column. In simple cases, it can be treated as a Column - mapped attribute. That means that this Attribute can be used further as a search parameter.
When one Attribute is checked as “Smart Contract Ready”
Data can be sent to the Blockchain via a smart contract process.
Note: This also applies to Classes.
The relationship between Classes and Catalogs
Attributes are the fields that a user will have to complete when he creates a UI. The input type that is assigned to an attribute determines the type of data that can be entered, and the format of the field or input control.
From the standpoint of the customer, attributes provide information about something and are the options and data entry fields that must be completed so that that data becomes available.