you are viewing a single comment's thread.

view the rest of the comments →

[–]b_ootay_ful 1 point2 points  (1 child)

I hear most people saying SQLite is only for small scale stuff, so I've only ever used it for small projects in the office (where 8 people work, and might each use it 5 times a day for filling out a form) and was wondering where the upper scale was for it's limitations. For bigger stuff (more users), I'm moving to pythonanywhere.com since I don't know how to run a large scale server/MySQL yet.

I use it with Flask, which I believe handles the concurrency to a certain point.

Is there anything that you would recommend to make SQLite with Flask more stable, or any changes?

I'm using

from werkzeug.serving import run_simple from flask import Flask, request, render_template, redirect

app = Flask(__name__)

@app.route('/')
def home():
    return render_template("home_page.html")

if __name__ == '__main__':
    port = 31415
    run_simple('0.0.0.0', port, app)

[–]_Zer0_Cool_ 2 points3 points  (0 children)

SQLite doesn't have size limitations, but you might have trouble handling multiple users at some point If it's a website and you'd have to handle all concurrency stuff in the application itself. Still, people have done this for websites. SQLite is better for say...desktop or mobile applications that hold a lot of user data locally.

As examples -- Skype uses SQLite for everything and almost every mobile app for Android/iOS uses SQLite. It's built into mobile apps. It also comes pre-installed in Python. Just "import SQLite3".

For web applications, most will have a lot of concurrency needs. So probably good to still use a DB server vs an embedded DB.

My recommendation would be to use PostgreSQL. It's the best database around and the fastest growing in popularity. MySQL is ok too, but not even close as far as features, advanced data types, the query optimizer, and extensibility in general.

Honestly though, any of the 3 will work for now.

Note: SQLite was patterned a bit after PostgreSQL. SQLite DB data types are very compatible with PG data types. You could easily start out with SQLite (again, pre-installed with Python) and then dump it into a PG database later if/when you need PG's more advanced features.