SQLite 数据库文件使用什么扩展名有关系吗? [英] Does it matter what extension is used for SQLite database files?

查看:48
本文介绍了SQLite 数据库文件使用什么扩展名有关系吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用于 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 数据库文件使用什么扩展名有关系吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆