You can also define reusable types for any data model. These reusable types are sets
of attributes that can be used in one or more entities of the data model. Using reusable
types is a way of factoring the data model and managing the impact of changes since any
modification on a reusable type will have an impact on every entity that uses this
type.

Once the data model is created, you can easily create Views over one or multiple
business entities held in this data model. For example, you can right-click any of the
entities held in this data model and automatically generate a default View for the
selected entity. For more information, see Views.

A View allows a business user accessing Talend MDM Web User Interface to visualize specific records in this entity
according to the defined criteria.

Moreover, an authorized user of Talend MDM Web User Interface
can validate hub data against these data models. For more information, see the Talend MDM Web User Interface User Guide.

How to create a data model

Prerequisite(s): You have already connected to
the MDM server from Talend Studio.

To create a new data model, proceed as follows:

In the MDM Repository tree view,
right-click Data Model and select New from the contextual menu.

A dialog box pops up.

Enter a name for the new model. Make sure that the name contains valid
characters and does not already exist.

Keep the Create the corresponding Data Container at
the same time check box selected, so that the corresponding
data container with the same name will be created.

If needed, you can clear this check box and create its corresponding data
container later. For more information, see Data Containers.

Warning

A data container and its corresponding data model must have the same
name.

Click OK to validate your changes and
close the dialog box.

The newly created data model and its corresponding data container will be
shown in the MDM Repository tree
view.

Double-click the data model to open a default editor in the Studio
workspace where you can set up the parameters for the new data model.

If needed, click the [...] button next to
Description to open a dialog box where
you can add multilingual descriptions to the new data model.

Once you define the multilingual descriptions for the data model,
authorized users can hover over the data model or its corresponding data
container in the Domain Configuration area
to view in a tooltip the localized description corresponding to the selected
locale when they access Talend MDM Web User Interface.

You can define your business entities, attributes, annotations, etc. in the upper
part of the editor; while the lower part will display the properties of any of the
elements you select in the editor.

The editor also enables you to switch to the XML schema source by clicking the
Schema Source tab. After clicking the Schema Source tab at the bottom of the editor, you can
create the data model directly in the schema source, that is, an XML schema
document. For more information, see How to work with the schema source of a data model.

Additionally, the editor enables you to switch to a
graphical view of the data model by clicking the Design tab. You can design a data model from scratch using the
graphical designer. For more information, see Working with the graphical data model designer.

How to create business entities in the data model

Right-click in the Data Model Entities
panel and select New Entity to open the
[New Entity] dialog box.

In the Name field, enter a valid name for
the new entity.

Warning

Make sure the entity name does not contain the character "-".
Otherwise, warnings about invalid characters will be displayed in the
MDM Problems view.

Select the Complex type option if you
want to define a complete structure, such as an address. The steps that
follow differ according to the selected type.

Note

You cannot create two complex types where one is a base type and
the other is a type that derives from the base type, and then create
entities based on these types.

Instead, you should first define a higher level entity which
implements its own complex type (for example, Media) to define all common elements
for the entity. Next, define another complex-type element (for
example, MediaSpecifics) which
can extend Media and then be
extended in turn. In this example, MediaSpecifics could be extended with Books to add elements that are specific
to books and Audio to add
elements that are specific to audio media.

At this point you can create a Browse_item_Media#Books View that filters (where clause) on @xsi:type - equals - Books and a Browse_item_Media#Audio View that filters
on @xsi:type - equals - Audio. The
standard Browse_item_Media View
would return all media.

Select the Simple type option if you want
to define a single element type such as a phone number, an email, etc. The
steps that follow differ according to the selected type.

You can still change the entity type after you create it if you
right-click the entity in the Data Model
Entities panel and select Change to a
Complex Type or Change to a Simple
Type.

If you select Complex type, select the
group type among:

-All: to list the elements in any
sequence,

-Sequence: to list the elements
according to the defined sequence,

-Choice:
to have a choice on the elements.

Enter a name for the complex type in the corresponding field, if you want
to create a reusable type of this entity.

Warning

Make sure the name of a complex type does not contain the character
"-". Otherwise, warnings about invalid characters will be displayed in
the MDM Problems view.

Reusable types are sets of attributes that can be used in one or more
entities.

The complex type list gives you access to all complex types you create in
your data model. When defining a new entity, you can select from this list
the complex type from which you want to inherit elements in the new business
entity. Each complex type you define can serve as the basis for another
complex type. For further information, see Data model inheritance and polymorphism.

If needed, select the Abstract check box
to define the complex type as an abstract one.

Abstract complex types are useful for creating generic base types which
contain information common to a set of types. For example, you can define
Shape as an abstract complex type,
and then derive two complex types Circle
or Square from Shape.

An abstract complex type cannot be used directly as the main type of an
entity. Instead, you can use a complex type derived from this abstract
complex type.

Click OK to validate your changes and
close the dialog box.

The created business entity is listed in the Data
Model Entities panel with a by-default record, which takes
its name from the entity name with the suffix Id, and the complex type, if any, is displayed in the
Data Model Types panel.

Note

Each time you create a new business entity, a default Primary Key
record, which takes its name from the entity name with the suffix
Id, and a Unique Key record which
has the same name as the Entity are automatically created. For example,
if you create a new business entity and name it Agency, the Primary Key record AgencyId will be created automatically.

A Primary Key can be an integer but a Foreign Key must always be a
string. The server surrounds Foreign Keys with square brackets to
support compound keys.

Repeat the above steps to create as many business entities as you need in
your data model.

All business entities you create are listed in the Data Model Entities panel.

To finish defining the business entities in your data model, you must create
attributes in these business entities. These attributes represent the
characteristics of each of the business entities. For further information, see How to add attributes to the business entity.

Displaying user data differently based on locale

You can also set up multilingual elements so that the Talend MDM Web User Interface displays the data for a record
differently depending on the user's locale.

Enter a name and a minimum and maximum number of occurrences for the new
attribute in the corresponding fields.

Note

Talend Studio
supports the definition of multi-occurrence attributes. You can set the
Maximum Occurrence value to a
specific number or leave it blank, which means the maximum number of
occurrences is not bounded: in this case, the cardinality will be
[1..many] or
[0..many].

Click OK to validate your changes and
close the dialog box.

Follow the same steps to create as many attributes as needed in the
business entity.

All attributes you create are listed under the business entity in the
Data Model Entities panel, and all
complex types are listed in the Data Model
Types panel.

Note

The data model editor includes a Properties view that displays all the properties of the
selected entity/attribute in the data model. You can use this detail
view to edit dynamically any of the entity or attribute listed in the
data model. For further information, see How to use the Properties view in the data model editor.

If required, right-click any of the listed element and select Edit element to open a dialog box where you can
change the parameters for the selected element.

In the data model editor, you can click the Schema
Source tab to switch to the XML schema source of the data
model, or click the Design tab to switch to the graphical view of the data
model.

After defining business entities and attributes in your data model, you must set
annotations to these entities or attributes regarding access control, display issues, role
authorization, foreign keys, etc. For details, see the following
sections.

How to work with the schema source of a data model

In the data model editor, you can click the Schema
Source tab to switch to the XML schema source of the data
model.

Because Talend MDM uses XSD as
the language to support data modeling and to make it easier to import existing
XML schemas, you can use any of the XSD capabilities in any of the XML schema
views.

You can edit the XML schema source directly to customize the business entities
and attributes as required, and take advantage of such features as code-assist
and syntax highlighting.

The data model editor makes it very easy to add specific annotations to any
business entity in the data model.

Through annotations, you can define authorization of
roles regarding web interface access to business entities. You can also
define display issues related to language specific labels, foreign and
primary keys, multilingual description etc.

The below table describes the annotations you can add to business entities.

Option

Description

Add Key

To add a unique or a simple key to the selected entity.

Set the Labels

To have labels in different languages for any business entity
in the data model.

Set the Descriptions

To have multilingual descriptions for different business
entities in the data model.

Set Lookup Fields

To look up fields in the source system through a Process
attached to a specific view in order to enrich data on the fly.
For example, when an interaction is done on a business entity
that is not persisted or not totally persisted in the MDM Hub.
For further information, see Running the view result through a Process (registry style lookup).

Set the Primary Key Infos

To display specific data related to the business entity when
accessing any data record in the business entity through
Talend MDM Web User Interface.

To prevent one or several roles from accessing the selected
business entity through Talend MDM Web User Interface.

Set the Roles with No Create Access

To prevent one or more specific roles from creating data
records in the selected entity through Talend MDM Web User Interface.

Set the Roles with No Logical Delete Access

To prevent one or more specific roles from sending data
records to the trash can in the selected entity through
Talend MDM Web User Interface.

Set the Roles with No Physical Delete Access

To prevent one or more specific roles from deleting the data
records definitely from the selected entity through Talend MDM Web User Interface.

Set the Workflow Access

To grant access, through Talend MDM Web User Interface, for one or
several roles to intervene in a workflow task associated with
the selected business entity. For further information about
workflows, see Workflows.

To set advanced rules that you can use to define constraints
between attributes within an entity. For further information,
see How to add business rules.

Delete All Validation Rule

To delete all validation rules from the entity.

When you add any of the above annotation to a business entity, an Annotations node is added to the business entity in the
Data Model Entities panel. This node lists all
the annotations added to the business entity.