PHP - SQLite vs SQLite3

前端 未结 2 1086
情话喂你
情话喂你 2021-02-07 00:43

I\'ve made a web application using SQLite (2.8.17), I\'ve only now discovered that there\'s an SQLite3. It somehow eluded my attention when making the web application, probably

2条回答
  •  梦毁少年i
    2021-02-07 01:13

    SQLite2 internally stores every value as a string, regardless of its type.
    Upgrading to SQLite3 will certainly shrink the database size since numbers and BLOBS get stored in their native formats, which could make things run faster.
    Another big advantage in my opinion is that recent versions of sqlite, (starting from 3.6.23) support foreign keys.

    Since you were using PHP, I would suggest that you look into PDO. It could prove helpful in case you need to change the DBMS for the application

提交回复
热议问题