Posts with the tag SQLite

SQLite DB Introspection

If you have an SQLite database file and want to check its structure (programmatically)

SELECT * FROM sqlite_master;

To do this via Python as simple as possible, run:

conn = sqlite3.connect("your/database.sqlite")
c = conn<span...

Read on

PHP SQlite3 with PDO

If you want to use SQlite3 databases with PHP you should probably use PDO.

Install it like this:

su
apt-get install php5 php5-sqlite
echo -e "\nextension=pdo.so\n" >> ../conf/php.ini

Note: You don't need any command like pecl install pdo_sqlite or pecl install pdo as PDO is now included in the package php5-sqlite...

Read on

SQLite

http://www.sqlite.org/

Important Notes

Omitted SQL Language Features
http://www.sqlite.org/omitted.html

SQLite Keywords
http://www.sqlite.org/lang_keywords.html
you cannot choose table names from the keywords list!!!

enforce foreign keys
SQLite Foreign Key Trigger Generator: http://www.rcs-comp.com/site/index.php/view/Utilities-SQLite_foreign_key_trigger_generator
http://glossar.hs-augsburg.de/SQLite_Foreign_Keys_erzwingen
http://sqlzoo.net/howto/source/u.cgi/tip241028/sqlite

Jump Start

SQLite with Python

http://docs.python.org/library/sqlite3.html
http://www.wdvl.com/Authoring/python/SQLite/Watts07162009.html

Admin tools / GUIs

SQLiteStudio

http://sqlitestudio.one.pl/

Open Source, cross platform!

SQLite Database Browser

http://sqlitebrowser.sourceforge.net/

sudo apt-get install sqlitebrowser

Sqliteman

http://sqliteman.com/

sudo...

Read on