# Tutorial or Example to develop a custom DB

**URL:** <https://support.prodi.gy/t/tutorial-or-example-to-develop-a-custom-db/3486>\
**Category:** Uncategorized\
**Tags:** database, usage\
**Created:** [October 6, 2020, 6:14am UTC](https://support.prodi.gy/t/tutorial-or-example-to-develop-a-custom-db/3486 "2020-10-06T06:14:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![peeyushrai](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/peeyushrai/32/1666_2.png) [@peeyushrai](https://support.prodi.gy/u/peeyushrai)\
**Post date:** [October 6, 2020, 6:14am UTC](https://support.prodi.gy/t/tutorial-or-example-to-develop-a-custom-db/3486/1 "2020-10-06T06:14:51Z")

</div>

Hello, I am trying to develop a custom DB that will allow prodigy to send and receive annotated data to a service (rather than a DB like Postgres or SQLite). I looked at the documentation referring to peewee but it would be very helpful if there's a tutorial or example to develop this integration with my back end service.

---

<div class="post-metadata">

**Author:** ![ines](https://sea2.discourse-cdn.com/flex020/user_avatar/support.prodi.gy/ines/32/3_2.png) [@ines](https://support.prodi.gy/u/ines)\
**Post date:** [October 6, 2020, 8:15am UTC](https://support.prodi.gy/t/tutorial-or-example-to-develop-a-custom-db/3486/2 "2020-10-06T08:15:00Z")

</div>

Hi! We don't have a tutorial specifically for your use case (and it's often difficult because every use case is so different). Under the hood, Prodigy expects the `Database` object to be a class that exposes the following methods that are called as part of the lifecycle: [https://prodi.gy/docs/api-database#init](https://prodi.gy/docs/api-database#init) Not all methods have to do something – for instance, in your case, your `reconnect` method may do nothing, and your `add_dataset` and `add_examples` methods would make requests to your server.

Another potentially simpler alternative: the [`update` callback](https://prodi.gy/docs/custom-recipes#update) of a recipe is called whenever new answers are received from the web app. So if your goal is mostly to send the collected annotations to your service, you could just do this in the `update` callback. Then you could either disable Prodigy's default database, or keep a simple SQLite database as a backup, just in case.
