LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview interface with MongoDb or similar NoSql database

Hello everyone. I was wondering if anyone has tried interfacing labview with MongoDb or another similair NoSql database? If so what are you experiences and how did you go about doing so?

0 Kudos
Message 1 of 51
(15,130 Views)

Hi Keenan,

 

Have you tried out any of the Database Connectivity Toolkit functions?  I haven't seen anything related to using these types of NoSQL databases with LabVIEW.  My guess would be if it complies to the requirements in the Database Connectivity user manual, it should be possible.

 

0 Kudos
Message 2 of 51
(15,102 Views)

I haven't actually tried out any of the database connectivity toolit functions with a NoSql type enviroment. I was wondering if anyone had done such a thing before. Do you know if there is any good documentation or tutorials on how to use the Database toolkit? 

0 Kudos
Message 3 of 51
(15,072 Views)

There is documentation and examples that come with the toolkit. Since the toolkit is based entirely on ADO from Microsoft and SQL commands, I don't know how much good it would do for a NoSQL db.

0 Kudos
Message 4 of 51
(15,067 Views)

Hello,

 

have you now some experience on this subject ? I had the same question about LabVIEW + noSQL, and some doubts about the ability to do this with the current Database toolkit...

0 Kudos
Message 5 of 51
(14,977 Views)

The database toolkit wil lbe useless for your purpose, as was mentioned. MongoDB/NoSQL presumably has some DLL's you can call? Or an activeX / .NET interface? If any of these three are a go, you can at least in principle  do it.

0 Kudos
Message 6 of 51
(14,970 Views)

8 months later.. I had the same question and ended up on this post.

 

There is a C# driver which contains two DLLs which can be used to perform communication with the database.  I have a basic example working which:

 

  1. Connects to a "test" database
  2. Gets all Collection Names
  3. Opens/creates a collection and inserts a BSON document
  4. Reads back the BSON document

Hopefully this is of use to someone Smiley Happy

 

BlockDiagram.png


Regards,

Peter D

Message 7 of 51
(14,795 Views)

Helpful for me! I ran across a potential application for this snippet just last week and have it printed for a meeting. Thanks.

--
Peter Rifken - Field Engineer & Business Manager
Boston / North New England & Maine
0 Kudos
Message 8 of 51
(14,564 Views)

Kudo for the answer! That's really helpful information.

 

I also like to use some other functionality but unable to find the IMongoQuery constructor and its method. Could you please also provide an example to remove a record, like {Weather: rain; Colour: red}?

 

Thanks in advance.

0 Kudos
Message 9 of 51
(14,500 Views)

Hi landlord,

 

Glad you found it useful so far!  In general, I use the MongoDB documentation C# examples and then try to 'match' them in the LabVIEW code.

 

For queries it shows the following code:

 

var query = Query<Entity>.EQ(e => e.Id, id);

So I went looking for Query, which exists (MongoDB.Driver.Builders.Query) - but with no public constructor.  For fun, I tried placing a reference to this class and using an invoke node - this lists all the comparison types supported by MongoDB - some of which return a MongoDB.Driver.IMongoQuery.

 

I've setup a "AND" query which takes an argument of an array of 'queries' - I've then modified the BSON document code to also return an array of it's BSON elements - you can then create a EQ query for each element and wire them through to the AND query builder.  Probably not optimal but hey, it works Smiley Wink

 

FP.png

 

BD.png


Regards,

Peter D

Message 10 of 51
(14,477 Views)