# Read/Write to Internal Historian as SQL Alternative?

**URL:** <https://forum.inductiveautomation.com/t/read-write-to-internal-historian-as-sql-alternative/47138>\
**Category:** Ignition\
**Tags:** database, scripting\
**Created:** [May 26, 2021, 12:12pm UTC](https://forum.inductiveautomation.com/t/read-write-to-internal-historian-as-sql-alternative/47138 "2021-05-26T12:12:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmikesell](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@jmikesell](https://forum.inductiveautomation.com/u/jmikesell)\
**Post date:** [May 26, 2021, 12:12pm UTC](https://forum.inductiveautomation.com/t/read-write-to-internal-historian-as-sql-alternative/47138/1 "2021-05-26T12:12:58Z")

</div>

I am attempting to learn to use Ignition as a more flexible SCADA product offering for my company’s customers, most of whom run batch furnace processes. I would like to record the timestamps for the start and end of each batch in order to build intuitive reports in the Reports module.

I have seen a topic that explains a way this can be done in an external SQL database, but I do not believe all of our customers will have or want a separate SQL database for data. Can the Internal Historian be used as a database for reading and writing data on triggers similar to external SQL databases, or can it only be used for tag history purposes?

---

<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:** [May 26, 2021, 12:27pm UTC](https://forum.inductiveautomation.com/t/read-write-to-internal-historian-as-sql-alternative/47138/2 "2021-05-26T12:27:04Z")

</div>

Use a proper database. Even if the internal historian can do this (I don’t think it can, out of the box). It is based on SQLite, which is very much a light-duty, single-connection tool. At some point, your customers will ask someone else to pull data from your system, and your company would be criticized for using ~~such a lame kit~~ an inappropriate tool.

If your customer doesn’t want a separate database, offer to connect your system to their existing DB. Ignition doesn’t care where the DB is, and external DBs operated by client IT departments tend to be more robust than anything else.

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [May 26, 2021, 3:36pm UTC](https://forum.inductiveautomation.com/t/read-write-to-internal-historian-as-sql-alternative/47138/3 "2021-05-26T15:36:27Z")

</div>

Agree with @pturmel. Use a proper database. The database you choose can still be local, as in installed on the gateway. To the end user, they probably won’t even know the difference.
