# Emotional data querying: The BI scenario

Sandro Bimonte, Patrick Marcel, Stefano Rizzi

► To cite this version:

Sandro Bimonte, Patrick Marcel, Stefano Rizzi. Emotional data querying: The BI scenario. 32nd Symposium on Advanced Database Systems (SEBD 2024), Università degli studi di Cagliari, Jun 2024, Villasimius, Sardinia, Italy. hal-04698436

HAL Id: hal-04698436

https://hal.inrae.fr/hal-04698436v1

Submitted on 16 Sep 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Emotional Data Querying: The BI Scenario*

Sandro Bimonte¹,*, Patrick Marcel² and Stefano Rizzi³,.*

¹TSCF, INRAE - University of Clermont Auvergne, Aubière, France

²LIFAT - University of Tours, Blois, France

³DISI - University of Bologna, Bologna, Italy

**Abstract**

Emotional Intelligence (EI) is the capacity to use emotions to properly guide our actions. In this paper, we adopt the EI approach to explore the interplay between data, emotions, and actions, thus lying the foundations for an emotional approach to querying. The framework we propose relies on a four-layer model that describes (i) how emotions are connected to each other, (ii) which data may give rise to emotions, (iii) which emotions will be triggered in each user when seeing each piece of data, and (iv) which actions will be done as a consequence. The application scenario we propose is that of Business Intelligence, specifically, of a set of KPIs connected to the users' goals.

**Keywords**

Emotional Intelligence, Business Intelligence, KPIs

## 1. Introduction and motivation

The emotions raised by our own needs accompany our everyday life and, like it or not, have a strong influence on our choices and decisions. *Emotional Intelligence* (EI) is the capacity to recognize, manage, and use emotions to *properly* guide our own reasoning and actions. In other words, it is the ability to identify the *right* emotions and adopt them to adapt our actions and behavior, according to the context and environments [1]. It has been proved that EI is associated to high levels of job performance, mental health, and decision making.

In the context of Information Systems, how to cope with emotions during exploratory data analyses has not been investigated yet. In this preliminary work, we adopt the EI approach to explore the interplay between data, emotions, and actions, thus lying the foundations for an emotional approach to data querying aimed at taking better decisions. Indeed, seeing the results of a query on a dataset may trigger an emotion, which in turn can lead to a decision and/or an action.

**Example 1.** Consider a user, say Kathy, who has to decide whether to move or not from the city where she lives, say A, to a new one, say B. To make up her mind, Kathy compares the two cities from two points of view: the average salary and the crime rate. Checking some open databases

SEBD 2024: 32nd Symposium on Advanced Database Systems, June 23-26, 2024, Villasimius, Sardinia, Italy

<figure><img src="image_2.png" /></figure>

sandro.bimonte@inrae.fr (S. Bimonte); patrick.marcel@univ-orleans.fr (P. Marcel); stefano.rizzi@unibo.it

(S. Rizzi)

<figure><img src="image_3.png" /></figure>

0000-0003-1727-6954 (S. Bimonte); 0000-0003-3171-1174 (P. Marcel); 0000-0002-4617-217X (S. Rizzi)

<figure><img src="image_4.png" /></figure>

© 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).

<footnote>* This work has been supported by the French National Research Agency under the IDEX-ISITE project, initiative 16-IDEX-0001 (CAP 20-25), and the project ANR-20-PCPA-0002.</footnote>

<footnote>* Corresponding author.</footnote>
<figure><img src="image_5.png" /><figcaption>**Figure 1:** The AUDE model</figcaption></figure>

available, Kathy discovers that —contrary to her belief— the average salary in B is higher than the one in A, which surprises her. On the other hand, the crime rate in B is quite high, which raises fear in her. Combining surprise and fear gives rise to alarm, an emotion that implies an active response. The action Kathy can take is to examine additional factors, e.g., the quality of life, before taking her final decision. Importantly, this action comes from a correct recognition of Kathy's emotions. Had surprise not been recognized, Kathy's behaviour would have been exclusively dominated by fear, in which case she would probably have been paralyzed and unable to make a decision.

The framework we propose to keep emotions into account when querying data relies on an Action-User-Domain-Emotion (AUDE, in Latin “dare”) model that includes four layers: (i) an emotion layer (EL) that defines and connects emotions based on a classification drawn from affective science; (ii) a domain layer (DL) that characterizes the data that may trigger emotions via a set of queries; (iii) a user layer (UL) that connects the two by expressing the emotions of each single user as related to the query results (s)he sees; and (iv) an action layer (AL) that maps the emotions triggered by query results into actions consistently with the guidelines of EI. The overall picture is sketched in Figure 1. In what follows, for the sake of readability, we adopt Datalog rules as a comprehensive way to formalize all the layers.

**Example 2.** Considering again the example above, the EL expresses alarm as the combination of surprise and fear [2]; the DL includes the queries on the average salary and the crime rate in each city; the UL associates user's emotions to query results, e.g., high salaries surprise Kathy, high crime rate makes her fearful; the AL associates emotions to possible actions, e.g., stand by in case of alarm. A formalization of what stated above can be as follows:

$$ 
\begin{align*}
evaluateQualityOfLife() & \leftarrow alarm() \\
alarm() & \leftarrow surprise(), fear() \\
surprise() & \leftarrow avgSalary(x, 'A'), avgSalary(y, 'B'), y > x \\
fear() & \leftarrow crimeRate(x, 'B'), x > 70 \\
avgSalary(x, city) & \leftarrow employee(\_, \_, city), x = avg s : employee(\_, s, city)
\end{align*} $$

An interesting application scenario we envision for our emotional framework is that of Business Intelligence (BI), which gives computational support to users in exploring and analyzing
<figure><img src="image_6.png" /><figcaption>**Figure 2:** Emotional intelligence vs. business intelligence</figcaption></figure>

data. A main citizen of BI systems are OLAP tools, which enable analyses of huge volumes of data stored according to the multidimensional model. In order to support decision-makers in developing OLAP sessions when exploring data, several approaches for recommending OLAP queries have been devised (e.g., [3, 4]). These approaches recommend new queries based on those formulated during the past or current sessions, usually relying on some query similarity metrics and in some cases considering the query interestingness. However, none of these works take into account the complexity of the emotions that may arise during an analysis session to provide more effective recommendations.

In this scenario we propose to draw a parallel between the fulfillment of a goal, assessed by a *key performance indicator* (KPI), and the satisfaction of a need. As shown in Figure 2, needs are often represented in the form of a pyramid [5]; on the other hand, KPIs can be distinguished into *strategic*, *tactical*, and *operational* [6], determining a pyramidal classification that closely resembles the one of needs. Satisfying a goal/need will likely trigger a positive emotion, while the failure of a goal/need may trigger a negative emotion. In turn, depending on the emotion, the user will take an action, which in the BI application will consist of asking a new OLAP query of checking a new KPI. Specifically, we suggest to apply our framework to BI as follows: (i) for the EL, we refer to Plutchik's *wheel of emotions* [2]; (ii) the DL is expressed as a tree of KPIs following the approach proposed in [7]; (iii) the UL specifies how (i.e., through which emotion in the EL) each user will react to the evaluation of each KPI in the DL; (iv) the AL follows the guidelines of EI to map each combination of a KPI in the DL and an emotion in the EL into an action, i.e., a new OLAP query to be formulated or a different KPI to be evaluated.

The paper outline is as follows. Section 2 discusses related work. Section 3 introduces the EI model and showcases it on a BI scenario. Section 4 concludes the paper.

## 2. Related work

There have been several efforts in the literature to classify emotions in affective science so as to distinguish or contrast one emotion from another. In *discrete emotion theory*, people are thought to have an innate set of basic emotions, which can be distinguished by an individual's
facial expression and biological processes, and are cross-culturally recognizable [8, 9]. For instance, Ekman identified anger, disgust, fear, happiness, sadness, and surprise based on the corresponding facial expressions [10]. In Plutchik's wheel of emotions, eight emotions are distinguished, namely, joy, trust, fear, surprise, sadness, disgust, anger, and anticipation [2]. Emotions can have different degrees (e.g., serenity and ecstasy are, respectively, a mild and an intense form of joy), and have opposites (e.g., sadness is the opposite of joy). The author also theorized twenty-four primary, secondary, and tertiary dyads, i.e., feelings composed of two emotions.

As to KPIs, in [7] they are defined as metrics for evaluating goals in the context of BI and decision making. A KPI consists of an aggregate query, a target value to be achieved, and one or more thresholds that discriminate between good and bad performance. In turn, goals are frequently used in the design of BI systems to represent and engineer the users' requirements.

Finally, there has been many works on guiding users analyzing large datasets. Discovery-Driven Exploration (DDE) of data cubes, pioneered by Sunita Sarawagi [11, 12, 13], proposed techniques for interactively browsing interesting cells in a data cube. DDE was essentially motivated by explaining unexpected data in the result of a cube query, to be explained by generalization (rolling-up, to check whether the discrepancy follows a general trend) or by detailing (drilling-down, to understand what causes the discrepancy). DDE can be seen as a particular case of Exploratory Data Analysis (EDA), the general notoriously tedious task of interactively analyzing datasets to gain insights [14], which has attracted a lot of attention recently [15, 16]. In any case, all those works assume that the exploration is limited to the use of dedicated primitives (e.g., classical OLAP or SQL operations), and even though user profiles incorporating preferences [17] or intentions [3] may be used, to the best of our knowledge, none of them account for the user's emotions when querying.

# 3. The AUDE Model

In this section we describe the different layers of our model, with specific reference to the BI application scenario outlined in Section 1.

## 3.1. Modeling emotions

The EL models human emotions. To this end, in this paper we use Plutchik's model [2]. Plutchik formulated ten postulates among which there is a small number of basic, primary emotions (*joy*, *trust*, *fear*, *surprise*, *sadness*, *disgust*, *anger*, and *anticipation*); all other emotions are mixed or derivative states occurring as combinations of the primary emotions. Primary emotions are hypothetical constructs whose properties and characteristics can only be inferred from various kinds of evidence, and they can be conceptualized in terms of pairs of polar opposites. Primary emotions can be of three intensity degrees (mild, basic, and intense); for example, distraction is a mild form of surprise, and rage is an intense form of anger. Twenty-eight secondary emotions are derived by combining each primary emotion with the others, for instance:

$$ \textit{love()} \leftarrow \textit{trust()} , \textit{joy()} \qquad (1) $$

$$ \textit{curiosity()} \leftarrow \textit{trust()} , \textit{surprise()} \qquad (2) $$
<figure><img src="image_7.png" /><figcaption>**Figure 3:** The Business Intelligence Model for an e-commerce company</figcaption></figure>

## 3.2. Modeling domains

The DL describes parts of the dataset susceptible to trigger emotions. In general, emotions are triggered by events of daily life, and correspond to the satisfaction (or not) of human *needs*. As already mentioned, the seminal work of Maslow [5] represents needs organized in a pyramid. On the bottom of the pyramid there are human basic survival needs, such as eating and sleeping, followed by safety needs, related for instance to health and employment. The two next layers include needs related to love and belonging (e.g., friendship and family) and to esteem (e.g., respect and freedom). On the top level are individual accomplishment needs related to achieving one's full potential, which also includes creative activities. Noticeably, it is recognized that having a gradual bottom-top satisfaction of needs is the only successful way.

In our BI application scenario, The DL contains the definitions of KPIs. A KPI is a numerical metric used to monitor the achievement of a business goal; it consists of a query (typically, an aggregate one), a target value to be achieved, and one or more thresholds that discriminate between good and bad performance [7]. To represent KPIs we adapt the Business Intelligence Model of [7], which connects KPIs (triangles) to goals (ovals); goals can be AND- or OR-decomposed into subgoals. If a goal is a conjunction of subgoals, then they all must succeed for the goal to succeed; if it is defined as a disjunction of subgoals, then at least one of them must succeed. In this work we will assume for simplicity that each (sub)goal is connected to exactly one KPI.

**Example 3.** Consider the Business Intelligence Model for an e-commerce company shown in Figure 3, focused on the Increase revenue strategic goal. This goal can be achieved either by broadening the customer base or by increasing the customers' loyalty. At the tactical level, increasing the
customers' loyalty is declined into increasing the customers' satisfaction; this, in turn, is obtained at the operational level by improving the design and reliability of products. Each goal is related to a KPI; for instance, the customer retention rate is used to check if the customers' loyalty has increased. Here are some examples of how this Business Intelligence Model can be coded on a simplified database schema that represents sales and clicks for the e-commerce site:

$$ 
\begin{aligned}
& \text{SALE}(\text{IPaddress}, \text{date}, \text{time}, \text{revenue}, \text{specialOfferYN}) \\
& \text{CLICK}(\text{IPaddress}, \text{date}, \text{time})
\end{aligned}
 $$

Three goals are expressed as Boolean queries and the associated KPIs are expressed as aggregation queries (the rules for computing dailyClicks, totalVisitors, percSaleViaSpecOff, and totalCustomers are omitted for brevity):

$$ \text{LaunchAdvCamp()} \leftarrow \text{numbClicks}(x), x > 1000 \qquad (3) $$

$$ \text{numbClicks}(x) \leftarrow x = \text{avg c : dailyClicks}(\text{date}, c), \text{lastWeekDays}(\text{date}) \quad (4) $$

$$ \text{goodNumbClicks()} \leftarrow \text{numbClicks}(x), x > 2000 \qquad (5) $$

$$ \text{goodPPVSO()} \leftarrow \text{percSaleViaSpecOff}(x), x > 0.3 \qquad (6) $$

$$ \text{GetNewCustomers()} \leftarrow \text{custConvRate}(x), x > 0.3 \qquad (7) $$

$$ \text{custConvRate}(s/c) \leftarrow \text{totalVisitors}(c), \text{totalCustomers}(s) \qquad (8) $$

### 3.3. Modeling users

The UL lets users express their emotions when considering data characterization made in the domain layer. It is also responsible for describing the emotions intensity. Importantly, this layer is user-dependent, which means that all thresholds are the user's own ones.

**Example 4.** With reference to Example 3, a possible user's emotional behavior is:

$$ \text{joy()} \leftarrow \text{goodNumbClicks()} \qquad (9) $$

$$ \text{joy()} \leftarrow \text{goodPPVSO()} \qquad (10) $$

$$ \text{trust()} \leftarrow \text{LaunchAdvCamp()} \qquad (11) $$

$$ \text{trust()} \leftarrow \text{GetNewCustomers()} \qquad (12) $$

### 3.4. Modeling actions

The AL models the actions to be taken when an emotion is triggered.

All emotions lead to one or another impulse to act (or not to act). According to Rosenberg [18], the process involving emotions is: (i) recognize the emotion, (ii) identify the need beyond the emotion, (iii) trigger an adequate action. Taking into account the connections between emotions and actions discussed in [1], we propose some rules for emotion-based triggering of actions in the BI application scenario. Let k be the KPI which just triggered the emotion:

* Joy. The user has presumably satisfied the goal G associated to k, and her mental state prepares her to face new goals. According to Maslow's work, which postulates that basic needs should be fulfilled first, this should be done by climbing up the goal tree. Thus, the action triggered is to evaluate the KPI related to G', supergoal of G.
* Anger. The user has presumably found that the goal *G* associated to *k* is not satisfied. This emotion needs an immediate action. Again based on Maslow's work, the suggestion is to move towards more basic needs. Thus, the action triggered is to evaluate the KPI related to *G*', a subgoal of *G*.

* Love. The user is in a calm state which encourages further exploration. Thus, the action triggered is to evaluate the KPI related to a sibling goal of *k*.

* Curiosity. The user wants to know more, thus, the action triggered is a roll-up of the query associated to *k*.

* Trust. The user is confident with the data she just saw, thus, the action triggered is a drill-down of the query associated to *k*.

* Surprise. The user has seen unexpected data and wants to get more information about the events; thus, the action triggered is a slice-and-dice of the query associated to *k*.

* Sadness. In this case, trying to satisfy other needs is not convenient. The action triggered is to move to a different goal tree or, if this is not available, stop the analytical session.

**Example 5.** Even the rules of the AL can be expressed in Datalog, for instance:

checkSiblingKPI() ← love() (13)

checkFatherKPI() ← joy() (14)

drillDown() ← trust() (15)

### 3.5. The AUDE Model at work

In this section we simulate how the different pieces fit together in a simple scenario. The reader can use Figure 4 as a reference of KPIs, goals, emotions, and actions. Suppose Karen starts by checking the *numbClicks*(*x*) KPI, which evaluates to 2500 via rule (4) of the DL. This triggers rules (3) and (5), which makes both *LaunchAdvCamp*() and *goodNumbClicks*() true. In turn, this triggers rule (9) and (11) of the UL, so the expected emotions of Karen are joy and trust. These two emotions, together, give rise to love (via rule (1) of the EL). The suggested action for love is to evaluate a sibling KPI (rule (13) of the AL), hence, the *percSaleViaSpecOff*(*x*) KPI is evaluated. Now, let 0.35 be the value of the *percSaleViaSpecOff*(*x*) KPI; this triggers rules (6) of the DL and (10) of the UL, which raises joy in Karen. The suggested action for joy is to evaluate the father KPI (rule (14) of the AL), hence, the *custConvRate*(*x*) KPI is evaluated via rule (8) of the DL. Finally, let 0.4 be the customer conversion rate. This triggers rule (7) of the DL, which generates trust in Karen (rule (12) of the UL). The suggested action is a drill-down (rule (15) of the AL), so Karen will for instance drill-down to customers' age ranges.

## 4. Conclusions and open issues

Studying the interplay between database querying and emotions is challenging, even because it involves complex (and controversial) disciplines such as psychology and sociology. In this paper we made a first attempt in this direction by defining a layered model whose first-class citizens are users, queries, emotions, and actions. The underlying idea is to connect queries to user's
<figure><img src="image_8.png" /><figcaption>**Figure 4:** A simple flow of emotions</figcaption></figure>

emotions first, then user's emotions to actions. As an application scenario for our approach we proposed BI, mainly because the specific features of KPI (namely, their connection to goals, their tree-like structure, and their threshold-based definition) allowed us to establish an intuitive connection with emotions and actions. Remarkably, by using Datalog for expressing the model, we delivered a uniform formalization for all layers.

Clearly, the path to efficient and effective emotion-aware querying is still very long. There is a lot of questions that need an answer, among these:

* The DL can be built based on a conceptual goal-driven description of the application domain, the EL is easily derived from the adopted model of emotions, and the AL follows the guidelines of EI. Conversely, creating the UL is an open challenge since the emotions raised by query results may be quite different for each single user. One possibility we envision to address this issue is to progressively learn the UL by asking each user, during data exploration sessions, to explicitly react to the data she sees by selecting an emoticon out of a palette (as commonly done in social media).

* The BI scenario provides a clear set of possible actions (either evaluate a KPI or apply an OLAP operator). In a more general setting, like the one described in Example 1, would actions still correspond to queries? If so, how to connect each emotion to a query?

* Conflicts are part of the human nature, so contrasting emotions may rise in a user. The classification of emotions we adopted here deals with this by defining secondary emotions such as *confusion*, which is a mix of surprise and anticipation; however, not all classifications do the same. Adopting a classification that does not explicitly cope with contrasting emotions would require checking the emotional model for conflicts.
References

[1] D. Goleman, Emotional intelligence, Bantam Books, 2006.

[2] R. Plutchik, The nature of emotions: Human emotions have deep evolutionary roots, a fact that may explain their complexity and provide tools for clinical practice, American Scientist 89 (2001) 344–350.

[3] K. Drushku, J. Aligon, N. Labroche, P. Marcel, V. Peralta, Interest-based recommendations for business intelligence users, Inf. Syst. 86 (2019) 79–93.

[4] E. Negre, F. Ravat, O. Teste, OLAP queries context-aware recommender system, in: Proc. DEXA, 2018, pp. 127–137.

[5] S. McLeod, Maslow's hierarchy of needs, Simply psychology 1 (2007).

[6] Y. Li, J. O'Donnell, R. García-Castro, S. Vega-Sánchez, Identifying stakeholders and key performance indicators for district and building energy performance analysis, Energy and Buildings 155 (2017) 1–15.

[7] A. Maté, J. Trujillo, J. Mylopoulos, Specification and derivation of key performance indicators for business analytics: A semantic approach, Data Knowl. Eng. 108 (2017) 30–49.

[8] P. Ekman, An argument for basic emotions, Cognition and Emotion 6 (1992) 169–200.

[9] G. Colombetti, From affect programs to dynamical discrete emotions, Philosophical Psychology 22 (2009) 407–425.

[10] P. Ekman, Facial expressions of emotion: New findings, new questions, Psychological Science 3 (1992) 34–38.

[11] S. Sarawagi, Explaining differences in multidimensional aggregates, in: Proc. VLDB, 1999, pp. 42–53.

[12] S. Sarawagi, User-adaptive exploration of multidimensional data, in: Proc. VLDB, 2000, pp. 307–316.

[13] G. Sathe, S. Sarawagi, Intelligent rollups in multidimensional OLAP data, in: Proc. VLDB, 2001, pp. 531–540.

[14] S. Idreos, O. Papaemmanouil, S. Chaudhuri, Overview of data exploration techniques, in: Proc. SIGMOD, 2015, pp. 277–281.

[15] O. B. El, T. Milo, A. Somech, Automatically generating data exploration sessions using deep reinforcement learning, in: Proc. SIGMOD, 2020, pp. 1527–1537.

[16] P. Ma, R. Ding, S. Han, D. Zhang, MetaInsight: Automatic discovery of structured knowledge for exploratory data analysis, in: Proc. SIGMOD, 2021, pp. 1262–1274.

[17] J. Chomicki, Preference formulas in relational queries, ACM Trans. Database Syst. 28 (2003) 427–466.

[18] M. B. Rosenberg, D. Chopra, Nonviolent communication: A language of life: Life-changing tools for healthy relationships, PuddleDancer Press, 2015.