# How to use realtime DB to collect user data?

**URL:** <https://community.thunkable.com/t/how-to-use-realtime-db-to-collect-user-data/1042209>\
**Category:** Questions about Thunkable X\
**Tags:** beginner\
**Created:** [January 5, 2021, 11:25am UTC](https://community.thunkable.com/t/how-to-use-realtime-db-to-collect-user-data/1042209 "2021-01-05T11:25:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tanasetaro](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tanasetaro/32/92072_2.png) [@tanasetaro](https://community.thunkable.com/u/tanasetaro)\
**Post date:** [January 5, 2021, 11:25am UTC](https://community.thunkable.com/t/how-to-use-realtime-db-to-collect-user-data/1042209/1 "2021-01-05T11:25:32Z")

</div>

I would like to understand how the real time DB works and how to use it.

---

<div class="post-metadata">

**Author:** ![jaythemanchs](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jaythemanchs/32/92809_2.png) [@jaythemanchs](https://community.thunkable.com/u/jaythemanchs)\
**Post date:** [January 5, 2021, 10:22pm UTC](https://community.thunkable.com/t/how-to-use-realtime-db-to-collect-user-data/1042209/2 "2021-01-05T22:22:41Z")

</div>

Hello @tanasetaro, the real-time database has four main functions.

- The get function

- The save function

- The AddListener function

- And the RemoveListener function

To save someone’s data you will need to perform a sign-in function to get the users ID. Then you can perform a Save function using the ID from the sign-in as the key and store their data in an object form.

Have a look at this example I have made.

[https://x.thunkable.com/copy/bc076239b75768fe48c4b1efe5475918](https://x.thunkable.com/copy/bc076239b75768fe48c4b1efe5475918)

(Please note you will have to supply your own API key and database URL)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:30pm UTC](https://community.thunkable.com/t/how-to-use-realtime-db-to-collect-user-data/1042209/3 "2024-11-08T13:30:59Z")

</div>


