Skip to content
  • 0 Votes
    14 Posts
    6k Views
    A

    That doesn't result in a system_sqlite plugin. Why don't you download a fresh copy of QT and you will see what I mean.

  • 0 Votes
    9 Posts
    4k Views
    kshegunovK

    @stormracer
    Hi,

    my development pc has this amount of memory. But for other pc i can't rely on this and i will get larger data files later. Therefor i search for a solution for managing large amount of data. My idea for sql was that database systems are made for efficient data storing and searching. I choose sqlite because it doesn't need a server in the background.

    Yes, somewhat, for general purpose data. Seeing you're searching for a set of particles in space (2D space?), and assuming you're wanting to mostly search and extract from the dataset not modifying it, I'd consider some sort of HDD swapped (or database backed) k-d tree. From my experience SQL databases behave rather poorly for scientific data, especially when the datasets are big. Also you could try getting a stripped down b-tree implementation (basically a database without the bells and whistles) that you can use for storage of the data and do the indexing/searching by yourself. Or the most basic approach is to work with the data as you'd do normally, but swap the dataset instead of holding it in memory (e.g. QCache comes to mind here).

    PS.
    Depending on how exactly you want to build the histogram you could also simply discretize the space (if I'm correct that you're working with floating point numbers for coordinates).

  • 0 Votes
    3 Posts
    1k Views
    DubsD

    @mrdebug

    Thank you for your response!
    Are you saying my plan seems plausible? Have you done these things before or is it an educated guess ?

    I'm in R&D so I can't tell you exactly what we're doing but I can tell you we're using a NXP imX6 with embedded linux and qt and the rest i have to say generalities - a device that measures something and also has user inputs how/what to measure - it's going to run a gui and a uart with data will be coming in both ways ( not at the same time- the gui will say "go" after variable inputs to start a measurement).

    Then I'll need to do computing on all that data and then write results somewhere that will again, be accessed later and printed out to gui.

    I am brand new to Qt but regardless it's my responsibility to get an accurate game plan and pluck away at the pieces.

    I dont and won't have anyone to write me anything. I have no say in that.. such is life.

    that's why - any literature, tutorials, videos that's what i'm searching for/diving into

    thanks for your time, much appreciated!

  • 0 Votes
    3 Posts
    3k Views
    the_T

    @Qjay

    As far as I remember, it is not possible to create indices within a create table statement in sqlite. So you have to split this into the create table and the create index statement as mentioned by @mrjj

  • SQLite3 Insert function

    Unsolved General and Desktop
    2
    0 Votes
    2 Posts
    1k Views
    mrjjM

    Hi
    You have a ":" too much for the bindvalue it seems.
    Also just so we are on the same page. a ("INSERT INTO"..) sql statement do not return
    rows. Only a("SELECT X ") sql would. (AFAIK)

    bool createConnection() { QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE"); db.setDatabaseName(":memory:"); if (!db.open()) { QMessageBox::critical(0, qApp->tr("Cannot open database"), "Click Cancel to exit.", QMessageBox::Cancel); return false; } QSqlQuery query; qDebug() << "table:" << query.exec("create table person (id int primary key, " "firstname varchar(20), lastname varchar(20), num int )"); query.exec("insert into person values(101, 'Dennis', 'Young','1')"); query.exec("insert into person values(102, 'Christine', 'Holand','2')"); query.exec("insert into person values(103, 'Lars junior', 'Gordon','4')"); query.exec("insert into person values(104, 'Roberto', 'Robitaille','5')"); query.exec("insert into person values(105, 'Maria', 'Papadopoulos','3')"); return true; } QSqlQuery query; int ok = query.prepare("SELECT firstname,num FROM person WHERE num=:thenum AND firstname=:thename AND lastname=:lastname"); query.bindValue(":thenum", 4); query.bindValue(":thename", "Lars junior"); query.bindValue(":lastname", "Gordon"); query.exec();
  • 0 Votes
    4 Posts
    1k Views
    SGaistS

    How are you querying the database with Qt ?