---
title: "Prepare Your Source Data: Keys, Timestamps, Indices"
url: "https://docs.noreja.com/en/article/prepare-your-source-data-keys-timestamps-indices"
language: "en"
last_updated: "2026-10-23T09:17:14.389Z"
---

# Prepare Your Source Data: Keys, Timestamps, Indices

What the tables of a data source should offer for a good process model: stable keys, linking columns, clean time stamps, and indexes for fast imports, with the Smart Index Suggestion tool.

The quality of the source data decides how well Noreja can rebuild the process: which events it sees, in which order and how they belong together. This page lists what the tables of a data source should offer, and how indexes make large imports faster. It's written for data specialists and the database administrators who support them.

### Events, Not an Activity Column

Noreja doesn't need an event log with an "activity" column. Each kind of event comes from a table, or from part of a table, that you set up as an object in the entity; see [Entities Explained](https://docs.noreja.com/en/article/entities-explained). What the tables need is a key, a time stamp and the columns that link them.

### Keys: Identify Every Row

-   Every table that records events needs columns that identify each row: a primary key or a combination of columns, such as document number and item number.

-   If a table has neither, add a key column in the source, for example a sequence or a hash of columns that don't change.

-   Keys must be stable: a row should keep its key when it's changed, so that a new import finds it again.

-   Declare primary and foreign keys in the database where you can. The Builder shows them, and **Suggest entities** uses declared foreign keys first to propose data connections; see [Create an Entity, Manually or with Suggestions](https://docs.noreja.com/en/article/create-an-entity-manually-or-with-suggestions).

### Links: Columns That Connect the Tables

Data connections match rows of two tables by columns with the same value, for example the order number in the order table and in the item table. Make sure these columns exist on both sides, with the same data type and format: an order number stored as text in one table and as a number in the other can't be matched directly. If two tables have no column in common, a third table that links them can be used as a cross table. How data connections are set up is in [Configure Objects and Relationships](https://docs.noreja.com/en/article/configure-objects-and-relationships).

### Time Stamps

-   Store event times in real date and time columns where possible. Text works too, if every value has the same format; see [Timestamps: Formats, Preview and Distribution](https://docs.noreja.com/en/article/timestamps-formats-preview-and-distribution).

-   Keep the time of day and the full precision. Events with only a date all happen at midnight, and their order within the day is lost.

-   Use one time zone per column, or store the time zone with the value. Mixed local times from different sites distort the transition durations between activities.

-   Avoid placeholder dates such as 1900-01-01 or 9999-12-31 for "not yet happened". Leave the value empty, and exclude such rows in the object with a WHERE clause, for example `freigegeben_am is not null`.

-   A change time stamp should only be filled when the row was really changed, and it shouldn't lie before the start time stamp.

### Indexes for Faster Imports

For every object, Noreja reads its table with one query, including the object's JOIN and WHERE clauses, page by page in the order of the key. For every data connection it joins the two tables on the mapped columns. Indexes help most on:

-   columns used in data connections and JOIN clauses,

-   columns used in WHERE clauses,

-   the key columns, which the paging sorts by,

-   the time stamp columns.

Agree on new indexes with your database administrator: they speed up reading but cost space and slow down writes in the source system.

#### Smart Index Suggestion

The Builder has a tool that proposes indexes for an existing entity. It's in beta and its interface is currently in German.

-   In **Builder** → **Entities**, click **Export** in the row of the entity and save the file (see [Export, Import and Copy Perspectives and Entities](https://docs.noreja.com/en/article/export-import-and-copy-perspectives-and-entities)).

-   Open **Smart Tools (Demo)** above the list and choose **Smart Index Suggestion (Beta)**. The tool opens in a new browser tab.

-   Load the exported file and choose your database system.

-   The tool lists index suggestions per table with a priority: high for columns of data connections and joins, medium for WHERE clauses, low for time stamps. Copy the SQL and hand it to your database administrator.

The tool works only with the file in your browser; nothing is sent to the database. Check the suggestions before running them: for SQL Server and PostgreSQL the generated SQL uses the schema `dbo` (in PostgreSQL usually `public` or your own schema is right), and for Oracle it names no schema. SAP HANA, Db2 and Snowflake aren't offered yet; the tool also lists MySQL and SAP Sybase ASE, which aren't Noreja data sources.

### Checklist

-   Every event table has a stable key.

-   The columns that link tables exist on both sides with the same type.

-   Time stamps are date/time columns with the time of day, in a known time zone, without placeholder dates.

-   The columns used in links, joins and filters are indexed.

-   The database user for Noreja can read all needed tables; see the section for your system in [Connect a Data Source](https://docs.noreja.com/en/article/connect-a-data-source).

### Related

-   [Entity Modelling Best Practices](https://docs.noreja.com/en/article/entity-modelling-best-practices)

-   [Timestamps: Formats, Preview and Distribution](https://docs.noreja.com/en/article/timestamps-formats-preview-and-distribution)

-   [Performance Tips for Large Imports](https://docs.noreja.com/en/article/performance-tips-for-large-imports)

-   [Connect a Data Source](https://docs.noreja.com/en/article/connect-a-data-source)
