SQLite Forum

Timeline
Login

4 forum posts by user Andrzej

2021-09-12
03:18 Post: Library "libsqlitejdbc.so"for Android (artifact: be06382c26 user: Andrzej)

I have

DriverManager.registerDriver((Driver) Class.forName(
                "org.sqlite.JDBC").newInstance());
connection = DriverManager.getConnection("jdbc:sqlite:" + dbname);
First, I changed temp directory, (old begin with "/data/user/0") for Samsung
System.setProperty("java.io.tmpdir","/data/data/com.sample.sqlite/cache"); 
next I changed dbname - in Android alone dbname cause search it in root directory I changed it to /data/data/com.sample.sqlite/cache/a1.db Finally I have:
java.lang.UnsatisfiedLinkError: dlopen failed: library "libsqlitejdbc.so" not found
Maybe libsqlitejdbc.so is, but in other folder than it is searched? I want compare time for JDBC, maybe using .so will faster than pure Java code. Usually Java code is translated to dex which is translated to binary code of snapdragon. What about native code Sqlite JDBC? I think libsqlitejdbc.so is designed for PC with x86 processors? Thus can't works in smartphones?

2021-09-11
19:46 Reply: Android and desktop Java library (artifact: af35680e9f user: Andrzej)

I have today written simple wrapper for libraries and test the same code on Laptop Core I3 8th Gen and Samsung A42.

I create 10'000 rows , each with column "to jest text" and float. Moreover I add two indices, unique for column 2 and not unique on column 1+2.

First I have 22 seconds on laptop; I make one transaction and I have only 150 ms. On Samsung phone 1000 ms.

Why? Phone cores are slower, but phone has more cores. Is possible run one transaction on more than one core in SQLite. Is possible further optimization in Java?

09:14 Post: Android and desktop Java library (artifact: 4b707a51b1 user: Andrzej)

import android.database.sqlite is accessible from standard Android library? How to use SQLite with Java for desktop? I want make portable library for test on desktop, using with Android app. I need make wrapper of two SQLite libraries?

2020-10-15
15:19 Post: Create table with column (artifact: deab38e536 user: Andrzej)

When I try "CREATE TABLE t1(a abc, b TEXT);" is no error although abc is no valid type. Column types are not important? How make columns 32 and 64 bit integer or bolean for flags?