Skip to main content

Posts

Showing posts with the label SQLite

SQLite: 3.Qt and SQLite

I mentioned before that SQLite is a C library. To use this library in C++ applications, you can use many wrappers . But since I'm going in the direction of Qt, I want to use the QtSql module . QtSql module uses some drivers to communicate with databases like SQLite, MySQL, Oracle ... Or add //in the *.pro file QT += sql and include //in any class #include <QtSql> The process is very easy: Create a database object. Open it. Then execute some queries. For this entry, I created a project to explain the basic features of QtSql. I will try to explain some parts of it, and you can download it and try to understand the complete code. Viewing Table Contents: To view table contents, you need a QSqlTableModel object. QSqlTableModel is a high-level interface for reading and writing database records from a single table. A simple way to use it is like this: After creating a database object, I create a QSqlTableModel object and connect it to my database. Then I name the tabl...

SQLite: 2.Administration Tool

After making some operations on a SQLite database using terminal , it would be better to have an easier and a more convenient tool. I wanted a free and easy-to-use program and i found Lita. Lita is a free SQLite database administration tool for Windows, MacOSX and Linux. Using Lita, you can: Open, create, compact, manage SQLite databases Create, rename, delete, and empty tables Create, rename and delete columns Create, modify and delete records Encrypt or re-encrypt your databases Run, import and export your custom SQL statements Create and delete indices Once I opened this program, I didn't need any tutorial to start using it. You should try it yourself.

SQLite: 1.Terminal Commands Tutorial

SQLite is a C library that implements a database engine. It is a perfect choice for embedded systems because of its small size and big capabilities. It may have some missing features ( click me ) but it is still a good choice ( click me ).   I want to start with a nice tutorial that uses only a command-line program for accessing and modifying SQLite databases ( sqlite-3_6_23_1.zip ). This tutorial does not require any previous knowledge of SQL databases. And even if you know, I guess you will not get bored because these are short and divided videos, so you can jump through them or have a quick overlook.