简体   繁体   中英

Difference between .db and .sqlite file

Through the SQLite database manager I am able to generate a .sqlite file.

And through Java code I am able to generate a .db file (database file) in SQLite database.

What is difference between the two files?

Absolutely none. SQLite does not care the least what extension the file uses. It checks whether what it was given is indeed a SQLite3 database by inspecting the magic number and the header.

It's purely up to you whether you use the suffix .db , .sqlite , .dat , .mydata , .foo or whatever... or no extension at all; that is also permitted. There is no standard and the documentation does not seem to make any particular suggestion either, so everybody uses something else.

Also, if you are using SQLite as a storage backend for your application, it actually makes sense to use extension specific to your application. Because it is not just any random SQLite database, it is SQLite database with specific schema storing particular kind of data.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM