sqlite

SQLite is extremely slow in Samsung Galaxy GT-I9000

I am having problem with performance of SQLite database in Android application in Samsung Galaxy GT-I9000 device. The database contains 10 tables with 3 - 8 columns each. As soon as a database file gains about 400 KB update/instert queries need much more time to execute - 2 seconds! In comparision to other devices (HTC Magic, HTC Desire...

SQLiteOpenHelper onUpgrade() Confusion Android

I am doing my first app with a database and I am having a little trouble understanding the onUpgrade function. My database has a table with an items and a favorite column so that the user can favorite an item. Most implementations I see simply drop the table and reconstruct it but I don't want to do this. I want to be able to add more ...

How to use a pre-populated database on a coredata context

Hi all, this is my first question here. Well, I am developing an iPhone application that will use coredata, but the theres not going to be an option to insert data into the database of the app. I want to know how to pre-populate it's database. I thought of creating a plist with all the info and make a function to put it all into the c...

Database LEAK, when taking a photo. SQLiteDatabase created and never closed. Android, Java, SQLite.

Greetings yet again. I have an minor issue when taking a photo. I have a button that invokes the camera, successfully takes a photo, and returns to my entry form. My only problem is the database leak that occurs when pressing the button to call the camera. My code looks a little something like this. public void takephoto(){ Int...

How do I get ID of an exiting table entry or insert a new one in case it doesn't exist efficiently?

I'm using SQLite to maintain a database which contains, among other things, a table with paths. The CREATE statement for the table looks like this CREATE TABLE path (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, UNIQUE(name)); I'm looking for a short way to say 'insert this given path into the ...

Android SQLite Index Optimization

I am optimizing our database for Android SQLite. The data is simple, 3 ints (Country, State, City) The data is stored in order by Country, State and City. If I create an index on the three fields in ASC, would that be the most efficient given that we "READ-ONLY" the data 100% of the time by the 3 fields? ...

String Aggregation in sqlite

Anyone knows if String Aggregation in sqlite is possible? If i have an animal column with 5 rows/datas, how can i combine them so that the output would be in one field 'dog','cat','rat','mice','mouse' as animals Thanks ...

Enable referential integrity with nHIbernate using SQlite database.

Good evening everyone, I've got a project using nHibernate (2.1.2.4000) and System.Data.SQLite (1.0.66.0). I want to enforce NHibernate to create foreign keys when it creates the database or at least use the "foreign key" keyword then I'll be able to create the triggers. I googled but I didn't find any documentation on how to do that a...

Column not found error with simple SQL query

I know its almost there, but base is telling me it can't find a column called table1.id when I know its there! UPDATE table2 SET col1 = (SELECT field1 FROM table1 WHERE table2.id = table1.id) WHERE table1.id = table2.id ...

what DB for high amount of inserts/sec

We're deploy an Instant messenger (AJAX), for it we write a comet server who will handle the communication now we want to store the sent messages to a DB, which DB engine one give the best performance? We talk about 5000 Insert/sec, i think MySQL and PostgreSQL was out of the game, any proposals? HamsterDB, SQLite, MongoDB ...? We don'...

can we use truncate query in android sqlite

can we use truncate query in android database? otherwise can we performing truncate operation using our java code? ...

Unable to install sqlite3-ruby gem

I've xcode 3.0 installed. And I need to install sqlite3-ruby gem (for rhosync). When I run: sudo gem install -l sqlite3-ruby I get following error: Building native extensions. This could take a while... ERROR: Error installing sqlite3-ruby: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/V...

Android-SQLite Database

Hi, I am new to android.I want to save my name in Sqlite database when i enter the text in TextEdit and clicking the save button .I have created a database as name.db.I do know how to link the text in TextEdit and button to the database. Please Help me out .Sample codes Will be were useful.Thanks in advance... ...

SQLite Password Recovery

Hi all, I have forgotten my SQLite db password. Is there any way I can recover the password? Thanks in advance, ...

Nhibernate SchemaUpdate and SQLite

Hi I have googled but haven't been able to find any information about future support for Nhibernates SchemaUpdate against SQLite? And does anybody have any other solutions to recommend? Thanks in advance ...

core data with pre populated sqlite from csv!!

Hi all, Ive been struggling with this for a couple of days now and after scouring the internet I still havent got it working. I have a csv file, from which I need to populate an sqlite db to use with core data. I thought I had found a solution here http://ablogontech.wordpress.com/2009/07/13/using-a-pre-populated-sqlite-database-with-c...

Trouble setting up sqlite3 with django! :/

I'm in the settings.py module, and I'm supposed to add the directory to the sqlite database. How do I know where the database is and what the full directory is? I'm using Windows 7. ...

Python ~ accessing tuple members in template class

I am new to Python - be forewarned! I have a template class that takes a list as an argument and applies the members of the list to the template. Here's the first class: class ListTemplate: def __init__(self, input_list=[]): self.input_list = input_list def __str__(self): return "\n".join([self._template % x f...

IPhone Development - Failed to use SQLite

Hi all, I'm trying to do a simply query in a database that I built, but is not working. The Path of the database looks very strange, I don't know if it is correct. I added the database in the "Resource" folder. Code: -(void)getInitialDataToDisplay:(NSString *)dbPath { int result; SQLiteTestAppDelegate *appDelegate = (SQLit...

Selecting the row before the resultset in sqlite

Hi guys. so lets say i have a table called data data id | date | name --------------------- 1 | 19/8/2010 | John 2 | 19/8/2010 | Mary 3 | 20/8/2010 | Peter 4 | 20/8/2010 | Bert 5 | 20/8/2010 | Ernie if i do a select statement like this SELECT * FROM data where date = '20/8/2010'; is it possible t...