# Ignition tag vs database

**URL:** <https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002>\
**Category:** Ignition\
**Created:** [January 16, 2025, 7:55pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002 "2025-01-16T19:55:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![steve\_r](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@steve\_r](https://forum.inductiveautomation.com/u/steve_r)\
**Post date:** [January 16, 2025, 7:55pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002/1 "2025-01-16T19:55:31Z")

</div>

I have a question about using ignition tags vs a database table for 'process data' storage. I work on the Manufacturing Execution System for our company so most of my concerns are more higher level and not controls oriented.

I come from a traditional software engineering background and I'm still new to Ignition. I struggle when deciding where to store process data if I should be putting the data in a tag or storing it in the postgres database.

By way of example, lets say that a user needs to scan in 10 sub-part serial numbers as they are working towards building a completed final part. There is a single scanner and they scan the serial numbers in succession. As each serial number is scanned, the MES system validates that the serial number is valid. I need to store all 10 serial number values so I can record the information correctly. Do I store those 10 serial numbers in a tag or in the database?

Part of me wants to create a table in the database for storing these values. I have access to a beefy acid database that I feel I should be leveraging. My thought process is 'this is what the database is designed for' as well as it removes load on ignition. Leave the tags for plc data and use the database for process data.

Is there a good argument against storing this transient data in the database and using tags instead? Am I over-optimizing for non-existent performance concerns? Is there a compelling argument for using tags or is it just considered idiomatic?

I feel like if I understood how tags are actually implemented it might be helpful, I've internalized tags to be equivalent to a redis data store.

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 16, 2025, 8:03pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002/2 "2025-01-16T20:03:22Z")

</div>

> [@steve\_r](#):
>
> I've internalized tags to be equivalent to a redis data store.

Pretty close.

If the state of your assemblies need to survive hiccups in Ignition, you almost certainly want to store persistent state in your database.

---

<div class="post-metadata">

**Author:** ![steve\_r](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@steve\_r](https://forum.inductiveautomation.com/u/steve_r)\
**Post date:** [January 16, 2025, 8:07pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002/3 "2025-01-16T20:07:48Z")

</div>

> [@pturmel](#):
>
> If the state of your assemblies need to survive hiccups in Ignition, you almost certainly want to store persistent state in your database.

This is what I thought as well. Are you able to provide examples of 'hiccups'? What types of events can result in the loss of data? Is it only 'something happened and the gateway restarted' or something else?

---

<div class="post-metadata">

**Author:** ![Rodrigo\_Bernardes](https://avatars.discourse-cdn.com/v4/letter/r/9de0a6/32.png) [@Rodrigo\_Bernardes](https://forum.inductiveautomation.com/u/Rodrigo_Bernardes)\
**Post date:** [January 16, 2025, 8:20pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002/4 "2025-01-16T20:20:39Z")

</div>

When you say store the serial numbers in tag, do you mean PLC tag or Ignition tag?  
I don´t know about the rules of your process, but I would try to keep the process working, even if the Ignition server fails. Trying to separate Process Control, Process Monitoring and Data Storage.

---

<div class="post-metadata">

**Author:** ![steve\_r](https://avatars.discourse-cdn.com/v4/letter/s/58956e/32.png) [@steve\_r](https://forum.inductiveautomation.com/u/steve_r)\
**Post date:** [January 16, 2025, 8:23pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002/5 "2025-01-16T20:23:53Z")

</div>

> [@Rodrigo\_Bernardes](#):
>
> When you say store the serial numbers in tag, do you mean PLC tag or Ignition tag?

Ignition tag.

Everything that we do MES-wise is in Ignition (sepasoft) so if Ignition has failed, everything is down.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 16, 2025, 8:53pm UTC](https://forum.inductiveautomation.com/t/ignition-tag-vs-database/101002/6 "2025-01-16T20:53:31Z")

</div>

The most common case where Ignition can lose state is a restart, yes. A close second would be redundancy fail-over, since state is synchronized between a redundant pair at slow intervals (tens of seconds), not continuously.
