# Ignition - MongoDB

**URL:** <https://forum.inductiveautomation.com/t/ignition-mongodb/54212>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [December 16, 2021, 8:29pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212 "2021-12-16T20:29:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [December 16, 2021, 8:29pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/1 "2021-12-16T20:29:31Z")

</div>

I’m on 8.1.12

Anybody has been able to connect a MongoDB local server ? Which JDBC have you used?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 17, 2021, 7:44am UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/2 "2021-12-17T07:44:34Z")

</div>

> [@Module feasibity for tag history to-from No-SQL DB](https://forum.inductiveautomation.com/t/module-feasibity-for-tag-history-to-from-no-sql-db/12351/2):
>
> Maybe? First, it’s going to depend on what flavor of No-SQL you’re using. SQL databases have a lot in common with each other, No-SQL less so. And for each No-SQL database, there are varying levels of support for interacting with Java. If this were my project, I’d start by seeing if there was something that would mimic a JDBC driver for my No-SQL database. (Like [unityjdbc.com/mongojdbc/mongo\_jdbc.php](http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php) – not an endorsement, I just hear it mentioned commonly in NoSQL discussions.) That would let y…

this was mention in the forum a while ago

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [December 17, 2021, 12:35pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/3 "2021-12-17T12:35:55Z")

</div>

I know that, and I’ve tried [unityjdbc.com/mongojdbc/mongo\_jdbc.php](http://www.unityjdbc.com/mongojdbc/mongo_jdbc.php), but I can’t get it work, connection always failed and I dont’know why.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 17, 2021, 1:20pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/4 "2021-12-17T13:20:23Z")

</div>

Can I ask why you would want MongoDB? If it is about JSON objects, PostgreSQL supports them as well fwiw and has a built in JBDC driver from Ignition.

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [December 17, 2021, 1:28pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/5 "2021-12-17T13:28:32Z")

</div>

I want to use Mongo for Time Series Collection, it’s more efficient than PostgreSQL, I already use PostgreSQL for config storage.

---

<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:** [December 17, 2021, 1:49pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/6 "2021-12-17T13:49:12Z")

</div>

It seems you are blazing a trail here. You get to figure out how to make it work, if possible. Please let us know how it turns out.

(I’m skeptical of the “more efficient” claim, fwiw.)

---

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [December 17, 2021, 2:05pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/7 "2021-12-17T14:05:19Z")

</div>

Based on [Database Comparison - SQL vs. NoSQL (MySQL vs PostgreSQL vs Redis vs MongoDB) | Blog - Python Software House With Heart and Soul, Poland](https://profil-software.com/blog/development/database-comparison-sql-vs-nosql-mysql-vs-postgresql-vs-redis-vs-mongodb/)

Performance and flexibilty seems to be better with NoSQL DB like MongoDB

---

<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:** [December 17, 2021, 2:08pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/8 "2021-12-17T14:08:09Z")

</div>

That link will be more interesting _ **after** _ you report how you made it work in Ignition.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [December 17, 2021, 2:39pm UTC](https://forum.inductiveautomation.com/t/ignition-mongodb/54212/9 "2021-12-17T14:39:02Z")

</div>

I wish the author of that showed what sort of table he ran the CRUD operations on and what if any indexes or primary keys the MySQL/Postgre tables had for said operations.

For example if the author ran `UPDATE table SET someColumn = y WHERE someOtherColumn=7` where someOtherColumn is not a index then you are setting up your db for failure as it requires a full table scan, O(n) where n is the number of records in the table, versus a complexity of O(log n) which is a big difference.

As @pturmel mentioned though even if you do succeed I do wonder how well it will with Ignition - I don’t know how you would be able to integrate Named Querys at all since Mongo doesn’t use SQL.
