Skip to main content

Build Your Data Model

Learning Objectives

After completing this unit, you’ll be able to:

  • Set up data sources and data extensions.
  • Build an attribute group in Contact Builder.
  • Identify data relationships and define cardinality.

Let’s Start Building

Get out your data model design and any notes about your data, it’s time to build your data’s new home. Like you, Maggie Quinn, a solution architect for shoe retailer Cloud Kicks, is ready to begin using Contact Builder. She’s been asked to create a new data model for customers. Let’s follow along as she completes this assignment.

Set Up Data Sources and Data Extensions

To begin, Maggie navigates to the Data Sources tab to enter in all the custom data sources Cloud Kicks will use in their model. Once done, she navigates to the tab for Data Extensions, to create the company’s planned data extensions. While she completes this task, she confirms the following info against her data model blueprint.

  • Is sendable? is checked, if needed
  • Data retention is applied, if desired
  • Data type is correct (especially for fields that will be used as foreign keys)
  • Length is appropriate for data
  • Primary key is selected, where appropriate
  • Send relationship is set to the correct contact key

Need a refresher on data extension creation? Check out the help topic, Create a Data Extension.

Create Attribute Groups

Once the setup of sources and data extensions is complete (and with a fresh cup of coffee in hand), Maggie creates an Attribute Group for her customer data model. Let’s review the steps she follows.

  1. In Data Designer, click the Create Attribute Group button.
  2. Enter a name for your attribute group. Create New Attribute Group for Cloud Kicks Customers
  3. Select an icon to visually represent the data.
  4. Click Create.

Next, Maggie needs to link all the available data to her new attribute group. Since she already created data extensions, she follows these steps. 

  1. Click Link Data Extensions.Cloud Kicks Customers attribute group with cursor on Link Data Extensions
  2. Select a data extension to connect to the contact model.
  3. Choose the attribute (or foreign key) that connects your data to that model.
    Customer ID text attribute connected to CustomerID text attribute with key icon

Remember, the attributes need to be the same data type in order to make the connection.


The key icon identifies if the field is the data extension’s primary key.

Specify Data Relationships

Whenever you link contacts to attribute sets or to other attributes, you need to set the relationship cardinality. Cardinality is a fancy way of saying how data relates to one another. Let’s review the options.

Relationship Cardinality Example
One-to-one A contact (or customer) exists once in a data extension.
One-to-many A contact (or customer) can have many purchases over time and can exist multiple times in a data extension.
Many-to-many (not used with contacts) A purchase can contain more than one product and a product can be part of more than one purchase for a single contact over time.

With this in mind, Maggie continues her steps.

  1. Select the desired data relationship. Cursor on Set Relationship iconCardinality selection of one-to-one for a customer’s data extension.
  2. Click Save.

Now that the first data extension is linked, Maggie moves on to link the customers data extension to the purchases extension by clicking the Set Relationship icon. 

Cardinality selection of one-to-one for a customer’s data extension.

She follows the same steps as above to connect attributes. This time, however, Maggie sets the cardinality to one-to-many, since a customer can have multiple purchases. 

Customers cardinality screenshot with the selection of one-to-many

When she’s finished, she clicks Save

To make sure that all the data she plans to import has a home, Maggie goes back to her data model to review what additional data extensions need to be linked. She follows the steps above until all data points are accounted for and linked appropriately. 


Be sure to map any subscriber data to the contact model within Contact Builder prior to any imports. This way, the subscriber’s primary key matches the contact’s primary key.

Now it’s your turn. You can create your company’s own unique data model by following a similar process to the one Maggie used. And it doesn’t stop there. Once your data has a home, you’ll want to tidy up. Here are some pointers for getting your data in tip-top shape for moving day.

  • Create a standard naming convention across platforms to help with consistency. For example, determine if you will use: Email Address or Email or EmailAddress.
  • Deduplicate data before importing.
  • Establish any email verification or validation systems that will be used before importing into Marketing Cloud Engagement.

In the next unit, you dig into temporary storage and the file import process. Get ready for the big move!


Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities