# Data

Most Bubble apps will be managing data stored in a database. This section of the reference covers how you access data, manages and compares results, searching and setting up security.

<details>

<summary><mark style="color:blue;">Data sources:</mark> the source from which you fetch data</summary>

Data sources are where you get your data from when building a dynamic expression. It is going to be the first section of the expression. Sources of data can be the current user, a search from the database, data from an external API, some page and browser information, etc.

[List of data sources](/~/revisions/cityQ1wuAKUIdbGUZo4Q/core-resources/data/data-sources.md)

</details>

<details>

<summary><mark style="color:blue;">Operators and comparisons:</mark> change, evaluate and compare data</summary>

Operators and comparisons are used to work with the results of the data from the data source. For example:

**Change (manipulate the data in real-time)**

* Change a text to uppercase
* Add a number to an existing number
* Add a number of days to a date

**Evaluate/compare (return a yes or a no)**

* Check if data has a certain value (i.e. *Name* equals *John*)
* Check if the current user is logged in
* Check if a date is bigger than today's date
* Check if the current user's age is the same as another user's age

[List of Operators and Comparisons](/~/revisions/cityQ1wuAKUIdbGUZo4Q/core-resources/data/operations-and-comparisons.md)

</details>

<details>

<summary><a href="/pages/-MTq-e1V7kkgdrOwxH_n">Search</a>: find the data you are looking for in the database</summary>

Searching is used to find specific data in the database. To do that, you instruct Bubble:

* What kind of data you are looking for (i.e. *Users* or *Products*)
* Provide constraints

[List of search tools and settings](/~/revisions/cityQ1wuAKUIdbGUZo4Q/core-resources/data/search.md)

</details>

<details>

<summary><a href="/pages/-MTq-fKFTjaQlrvQVfRM">Privacy:</a> setting up your database securely to maintain your user's privacy</summary>

Privacy and security are cornerstones of all apps that handle sensitive data.

[List of privacy rule settings](/~/revisions/cityQ1wuAKUIdbGUZo4Q/core-resources/data/privacy.md)

</details>

{% hint style="warning" %}
**Privacy and security** can be a very important part of your app's structure, and we highly recommend that you familiarize yourself with the different tools Bubble offers. The core reference explains each setting, but if you are new to the subject, we encourage you to read through our user manual security guide:

User manual article series: [Protecting data with privacy rules](/~/revisions/cityQ1wuAKUIdbGUZo4Q/help-guides/data/the-database/protecting-data-with-privacy-rules.md)
{% endhint %}

## Other ways to learn

<details>

<summary>User manual articles</summary>

#### Data

Our article series below dives deep into what data sources are, and how you can use dynamic, static and temporary data to when you build your app. If you are new to Bubble we recommend getting to know this chapter:

Article series: [Data](/~/revisions/cityQ1wuAKUIdbGUZo4Q/help-guides/data.md)

</details>

<details>

<summary>Video lessons</summary>

* [How to use the *Do a search for* expression](https://www.youtube.com/watch?v=-2_3kuyOxkw) (finding data in the database)
* [How to use search constraints](https://www.youtube.com/watch?v=gOjGDCJrXYI)
* [How to use *Ignore empty constraints*](https://youtu.be/6VEavvd4TG4)

</details>

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.bubble.io/~/revisions/cityQ1wuAKUIdbGUZo4Q/core-resources/data.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
