# NIM

### Data models

Each connected system has its own data format. Thus, to interoperate across systems, NIM converts all collected data into a standard, internal format. For NIM to perform this conversion, you must configure a data model for each connected system.

To get started, Configure a system's data model.

A system's data model comprises three things:

Each data model contains a set of columnar data tables, and each data table contains a set of data columns. This is the primary aspect of the data model, and structures the collected data itself.

All tables that can potentially be collected are pre-defined in system Connectors, outside of the NIM Studio. If you're connecting to an officially-supported system, these mappings are already defined for you and aren't user-editable. You only need to manually define them when creating Custom connectors.

To add custom attributes to a system's user account schema, and make them available for collection as columns inside a table, see Customize user account schema. (If you only want to map data to a custom attribute in a target context, and not collect it in a source context, instead see Create a custom attribute.)

Each collected data table can have zero or one columns designated as a primary key. This is the table's unique identifier, and rows in a key column must have unique values. For example, the key of an employees table might be employee_id.

The final aspect of data models are intra-system relations. These are relations between the collected data tables of the system.

##### 1-N intra-system relations

1-N relations are the most basic type of relation, from which N-N relations are derived. You must manually specify them in the NIM Studio, after keying your tables.

A 1-N relation means that for one (1) instance of entity X, there exists zero, one, or many (N) instances of entity Y. But for one instance of entity Y, there exists only zero or one instance of entity X.

##### N-N intra-system relations

NIM also supports N-N relations. Unlike 1-N relations, you don't manually specify N-N relations. Instead, NIM automatically calculates N-N relations based on your 1-N relations. You simply enable or disable them as needed.

A N-N relation means that for one (1) instance of entity X, there exist zero, one, or many (N) instances of entity Y; and for one (1) instance of entity Y, there exists zero, one, or many (N) instances of entity X. For example, an N-N relation can occur in a system where a group can have multiple users and a user can have multiple groups.

Strictly speaking, N-N relations don't add any functionality that is not already possible with 1-N relations. Instead, they reduce the number of necessary 1-N relations and simplify the use of filters.

### Note

A system's data is not itself part of the data model—although it is structured by the data model.