Well I don't use mysql because I don't like programming php, I prefer to program python and sqlite3 is native to > python 2.4.
however since mysql and sqlite3 are very similar my points are still valid
think of an sql table like a table in excel, each column labeled
for example
code:
userID username reputation dateJoined posts website
1 Jarrod 10 10/3/2009 666 google.com
2 fred 8 5/6/2009 5 yellowpages.com
so say you table looks like that; it's not to hard to use a csv file to store the same information,
but take this query
you want all the users who's reputation => 10
in python
python code:
def get_record():
for item in open('users.txt').readlines():
if item[2] => 10:
return item
now using sqlite
python code:
import sqlite3 as sql
dbname="Users"
con=sql.connect("%s.db"%dbname,isolation_level=None)
cur=con.cursor()
print cur.execute("SELECT * FROM Users WHERE reputation => 10")
now that won't work completely it will be buggy cos I didn't test it but the idea is that you don't need to write in iterations and such the sql does most of that for you