用于 SQLite 数据库的文件扩展名有优点还是缺点?
Are there advantages or disadvantages to the file extension used for SQLite databases?
似乎 SQLite 本身不需要命名约定,但可能有其他原因导致特定扩展有用或有问题 - 例如,某些工具、编程语言、安装程序等.或最终用户的考虑.
It seems that SQLite itself does not require a naming convention, but there might be other reasons that a particular extension would be useful or problematic - for instance, certain tools, programming languages, installers, etc. Or end user considerations.
最常见的似乎是 .sqlite、.db 和 .db3.
The most common ones appear to be .sqlite, .db, and .db3.
推荐答案很大程度上取决于个人选择.根据您存储的数据库方案使用扩展可能是有意义的;将您的数据库架构视为一种文件格式,而 SQLite 只是用于该文件格式的一种编码.所以,你可以使用 .bookmarks 如果它存储书签,或者 .index 如果它被用作索引.
Pretty much down to personal choice. It may make sense to use an extension based on the database scheme you are storing; treat your database schema as a file format, with SQLite simply being an encoding used for that file format. So, you might use .bookmarks if it's storing bookmarks, or .index if it's being used as an index.
如果您想使用通用扩展名,我会使用 .sqlite3 因为它最能说明使用数据库所需的 SQLite 版本.
If you want to use a generic extension, I'd use .sqlite3 since that is most descriptive of what version of SQLite is needed to work with the database.
更多推荐
SQLite 数据库文件使用什么扩展名有关系吗?
发布评论