Search code examples
pythondatabasesqlitefilenames

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?


Solution

  • 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