using SQLite in Django in production?

后端 未结 6 685
温柔的废话
温柔的废话 2020-12-05 17:55

Sorry for this question, I dont know if i\'ve understood the concept, but SQLite is Serverless, this means the database in in a local machine, and it\'s stored in one file,

6条回答
  •  失恋的感觉
    2020-12-05 18:25

    This issue in database theory is called concurrency and SQLite does support it in Windows versions > Win98 and elsewhere according to the FAQ:

    http://www.sqlite.org/faq.html#q5

    We are aware of no other embedded SQL database engine that supports as much concurrency as SQLite. SQLite allows multiple processes to have the database file open at once, and for multiple processes to read the database at once. When any process wants to write, it must lock the entire database file for the duration of its update. But that normally only takes a few milliseconds. Other processes just wait on the writer to finish then continue about their business. Other embedded SQL database engines typically only allow a single process to connect to the database at once.

    Basically, do not worry about concurrency, any database worth its salt takes care of just fine. More information on as how SQLite3 manages this can be found here. You, as a developer, not a database designer, needn't care about it unless you are interested in the inner-workings.

提交回复
热议问题