Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
412 views
in Technique[技术] by (71.8m points)

database - Hi, I just wanted to know what is the difference between myDb.db and db.myDb in python sqlite

So, I was just looking for a tutorial for sqlite3 python. Some people use the database name with db.myDb, and others use myDb.db. Can anyone explain the difference between the format names?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It does not matter which file-extension a database has to its functionality. It is just a name, so reading and writing will work the same.

Most Operating-Systems use the extension to determin wich icon to show in a file-browser or with which application to open a specific file. So choosing the right file-extensions for your database improves your workflow.

Typical extensions for sqlite3 are:

  • .sqlite
  • .sqlite3
  • .db
  • .db3
  • .sdb
  • .s3db

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...