I would need something similar to:
Code: Select all
wxSQLite3Database* h_dbi[1024] = new wxSQLite3Database();
How would it be possible to achieve something similar.
And what is the limit on open wxsqlite3 Databases?
Code: Select all
wxSQLite3Database* h_dbi[1024] = new wxSQLite3Database();
In principal you could allocate an array of wxSQLite3Database objects with the following statement:Wolfgang wrote:I would need something similar to:Code: Select all
wxSQLite3Database* h_dbi[1024] = new wxSQLite3Database();
Code: Select all
wxSQLite3Database* h_dbi = new wxSQLite3Database[1024]();
// Open first connection
h_dbi[0].Open(...);
Do you really have many separate database files? This smells like a bad design for your application.Wolfgang wrote:I want to have open a lot of databases at once, it is for a bible programm, and keeping everything in memory would take too much space, at least I think so.
The best approach would be to organize the information within a reasonable small number of databases. The number of tables in a database is not limited. However, you can't join more than 64 tables in a single query.Wolfgang wrote:How would it be possible to achieve something similar.
This is not a limitation of wxSQLite3Database, but a limitation of the underlying operating system. Most operating systems have limitations on the maximum number of files which can be open at the same time. Since SQLite databases are ordinary files, such a limitation holds true for databases as well.Wolfgang wrote:And what is the limit on open wxsqlite3 Databases?
With additional informatin like strongs numbers, versenumbers chapter book, and everything inseperate fields, it easily grows to 40mb. And that is for just one translation, furthermore, dictionaries easily go up to 100mb per dictionary.doublemax wrote:One database is enough. The database file can be as big as you like.
And BTW i found "Martin_Luther_Uebersetzung_1912.txt" and it's less than 5mb. I think memory size won't be a problem.
So what?! The theoretical size limit for a SQLite database is roughly 140 terabytes. How many translations do you have in mind? And do you need access to all of them at the same time?Wolfgang wrote:With additional informatin like strongs numbers, versenumbers chapter book, and everything inseperate fields, it easily grows to 40mb. And that is for just one translation, furthermore, dictionaries easily go up to 100mb per dictionary.
Of course, you could have a separate database file for each translation. However, if you choose that approach your application should limit the number of translations accessible at the same time to a reasonable number. I doubt that anybody needs simultaneous access to all available translations.Wolfgang wrote:And adding new translations is easier if in seperate files.