help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU Octave - MongoDB database connection


From: Olaf Till
Subject: Re: GNU Octave - MongoDB database connection
Date: Mon, 25 Apr 2016 11:23:13 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Mon, Apr 25, 2016 at 12:09:14AM +0100, Mohamed Mahdi Soltani wrote:
> Hello,
> 
> I am working on a project where I need to constantly import csv data files
> from a mongoDB database, and treat them within Octave. Unfortunately, this
> feature (connecting Octave to mongoDB) is not yet supported. So, I am
> writing you to ask if there's a possibility you could give me a hand on
> figuring out how to make it work, or guidance on how to start.
> Thank you very much.

Hello Mohamed,

I can only give you general advice, as a start.

One possibility is to learn how to program plugins (oct-files) for
Octave, learn how to use the C- or better C++ library for mongodb, and
write an oct-file which uses this C(++) library to access the
database. Typically, all programmed functions which access the
connection have to be within a single oct-file, since different
oct-files don't see the data symbols of each other, they see only the
symbols of Octave. If you want to represent the connection in a user
variable of Octave, and if you have to take care of a state of the
connection (e.g. open or closed) in this variable, then the only clean
way is to derive a dedicated class from octave_base_value (this has
been done elsewhere for this purpouse, feel free to ask for examples
if you go this way).

If you don't want this effort, maybe you can call (with Octaves
'system()' or 'popen2()' functions) some different language which
already has mongodb support.

Olaf

(PS: If some should think this is something for the database package
-- it's probably not, since mongodb is not an SQL database.)

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]