Choosing the Right Data Store

Objective

After completing this lesson, you will be able to determine the appropriate repository to store customer data to enable customer account queries.

Data Schema

Data Schema diagram showing two main components: Account Store containing accounts, data, internal, profile, and subscriptions sections; and Data Store containing ds folder with FamilyMember and PurchaseOrder tables, connected by arrows from the Data Schema box on the left.

The Data Schema within SAP Customer Data Cloud defines how you structure and store customer data. It's essentially the blueprint for your customer data model, and it's divided between the Account Store and the Data Store.

The Accounts Schema allows you to add and access up to 1000 additional custom fields beyond the default Profile object for each of your sites (API keys).

Account Store

The Account Store consolidates customer data from various sources. Think of it as the central repository for core customer profile information.

Key Features of the Account Store:

  • Profile: Holds standard profile attributes like name, email, address, etc.
  • Identities: Stores identity information used for authentication and linking customer accounts across different systems. This is the main store used by Login and Accounts APIs.
  • Custom Data: Allows you to add up to 1000 additional custom fields per site (API key) to store specific customer attributes.
  • System Namespaces: Contains system-generated data fields that are returned with login requests and responses. These fields are not directly editable.
  • Subscriptions (Legacy Account Model): If the Legacy Account Model is enabled, this namespace stores subscription-related data.
  • Preferences (Consent Management): If Consent Management is enabled, this namespace stores customer consent preferences.

Data Store

The Data Store (DS) is a flexible, fully indexed cloud database with a dynamic schema designed to store generic data objects. It is usually used to store transactional information generated from customer interactions, in other words, customer activity data. Its flexibility includes the ability to configure the way data is stored by setting the default behavior for the ds.store method and the ability to fetch data from the DS in one of two ways: search the entire database or, if the search involves a single known Object ID (OID), use ds.get for a fast data retrieval. Simple SQL-like queries can also be used when searching the DS

Note

The Data Store is a separate database from the Account Store and should not be confused with custom "data" fields in the accounts storage. Understanding this distinction is crucial for proper data management.

Note

If you make heavy use of Data Store, please consider a product dedicated to unify, find insights, and activate these hidden customer intents such as SAP Customer Data Platform, which is a full-featured solution dedicated to the same type of data you usually use the DS for, with the advantage of providing you with an AI-powered CDP that seamless integrates into your B2C and B2B Customer Data, SAP CX solutions, SAP S/4HANA, and many other systems out-of-box. Oh, and of course, SAP CDC fully integrates with SAP CDP.

If you are using the SAP Customer Data Cloud Data Store, you can also edit its schema using the Schema Editor. The editor gives you an unparalleled ability to customize the information you store for each user and the unique experience every user has when visiting your site.

  • System data fields are not displayed in the schema but are returned with the payload of the login request or response.
  • Identity Store is the main store (Login, Accounts API, etc.)
  • Data Store (DS) is an API Database (JSON) that can be customer, site, or project-specific. It's a cloud database that merges automatically with Identity Data.

Key Features of the Data Store (DS):

  • Dynamic Schema: The DS has a dynamic schema, meaning you can easily add or modify data structures without predefining them. This makes it ideal for storing unstructured or semi-structured data.
  • Flexibility: You can configure how data is stored using the ds.store method.
  • Querying: You can fetch data from the DS in two ways:
    • Search: Use SQL-like queries to search the entire database.
    • ds.get: If you know the Object ID (OID), use ds.get for fast data retrieval.
  • Integration: The Data Store merges automatically with Identity Data.

Choosing the Right Store

So, how do you decide whether to use the Account Store or the Data Store? Here's a simple guideline:

Use the Account Store for:

  • Core customer profile information (name, email, address, etc.).
  • Identity information used for authentication.
  • Customer attributes that are frequently used for segmentation and personalization.
  • Data that needs to be readily available for login and account management processes.
  • Consent and subscription data.

Use the Data Store for:

  • Data that doesn't fit neatly into the Account Store's schema.
  • Data that is specific to a particular site or project.
  • Large volumes of data that are not frequently accessed.
  • Data that requires flexible querying and analysis.
  • Storing JSON data objects.

Summary

  • The Account Store is a cloud-hosted database that consolidates structured customer data from various sources to streamline identification and profile management.
  • The Data Store (DS) is a flexible, fully indexed cloud database with a dynamic schema that stores evolving transactional or application-specific data objects.
  • The choice between Account Store for core customer attributes and Data Store for flexible storage depends on your specific data nature and usage requirements.
  • Choosing the right store ensures optimal performance, scalability, and the ability to effectively query and analyze customer data.