top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Please suggest better resources for learning sqlite3 [CLOSED]

0 votes
32 views

I was writing a Python script for getting the user stats of a website(Specifically codereview.stackexchange). I wanted to store the stats in a database. I found Python3's sqlite3 library. I found that I needed sql commands for using it.

I have tried sql.learncodethehardway but it isn't complete yet. I tired looking on stackoverflow's sql tag also but nothing much there. Can someone suggest me better resources for learning sql/sqlite3?

closed with the note: None
posted Aug 3, 2013 by Abhay Kulkarni

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

2 Answers

+1 vote
 
Best answer
answer Aug 3, 2013 by Deepankar Dubey
0 votes

A start is the sqlite homepage: http://www.sqlite.org/docs.html

answer Aug 3, 2013 by Sonu Jindal
Similar Questions
+2 votes

I'd like to continue with Rails but I wonder how to switch from SQLite3 to MongoDB.

+1 vote

I would like to know if this problem is occurs only with me? I was unable to get Mysql2 ou Sqlite3 working with Ruby and rails.

-ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
-Rails 4.0.0.

I tried several tutorials but no one work for me.

See same examples, for sqlite3:
https://github.com/luislavena/sqlite3-ruby/issues/82
http://stackoverflow.com/questions/15480381/how-do-i-install-sqlite3-for-ruby-on-windows

And many others.
I can install de gems but When a run the app it´s simple crash.

+1 vote

I have an object (a variable) name, which gets its value from a PostgreSQL database via a SELECT statement, an it sometimes has special characters as ß, ä, ö...

Then I would like to insert that value into a table in a SQLite database. So I make a cursor cur on the table and prepare a SQL statement like this:

sql = 'insert into tbl values(?)'
cur.execute(sql, (name,))

That ends up with the exception, for example,

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 6:  ordinal not in range(128)

The "position 6" is exactly the position of the special character, ß in this case. What to do?

+2 votes

I am using SQLite through either Python 2.5 or 2.7, which is the sqlite3 module. In a desktop application, every now and then, and in a fairly irreproducible way, when committing to the database I get this error:

"sqlite3.OperationalError: SQL logic error or missing database"

I thought this was a PySqlite generated error, but now I see the same error is seen with Ruby, PHP, C++ and other languages, so now I think it is generated by SQLite itself...but I really don't know.

If I try additional commits in that same instance of my app being open, it gives me the same error every time. If I close the app and re-open it, it does not give me this error, with the same or very similar data
being written in the same routines. So I "know" that the code as written is correct (a significant--greater than 90%?--of the time I don't see this error).

In terms of what is causing this, I don't know. But I've noticed that on the occasions that this has happened my computer's RAM was pretty bogged down and my computer is pretty laggy. That said, I've had other times when my RAM was hogged just as much and it didn't do this.

This error might go away if I used a newer/cleaner/more RAM computer, but I want to "stress test" my application for those who may be using similarly clunky computers--I want to try to avoid it even for older
model computers.


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...