Working with SQLite on Fedora from Command Line and GUI



  • SQLite is a very useful, highly compact relational database available across many platforms. It is fast, simple, and light. It does not use an RDBMS, so has no runtime or network connectivity.

    Working with SQLite can be done programatically, of course, but from time to time direct access to the database may be warranted, especially during testing.

    Accessing SQLite from the command line is simple. On Fedora, the command is sqlite3 and all you need is the path to your database (SQLite databases are always a single file.)

    sqlite3 /var/files/mydata.sqlite
    

    Now you can interact with SQL commands. Most people will likely want to do something a bit more graphical if working with their database any great deal. For this, try out SQLiteMan, which is included in Fedora. First install it.

    sudo dnf install sqliteman
    

    Now you can open SQLiteMan from your start menu, and "open" the database file with which you want to work.

    0_1539457843653_Screenshot from 2018-10-13 14-10-38.png

    Remember, SQLite is not an RDBMS and there is no access control beyond the normal file system ACLs. There is also no locking or multi-user support. This is just a database file. So connecting with one of these clients while the database is in use by an application can be dangerous.



  • If you want to exit the SQLite command line shell, the command is dot exit... .exit