Images in the database can be stored in
Binary Large Object
), that is an array of binary data format.
format is also suitable for storing audio and video data in databases.
Consider the saving and loading of the image from the database as an example of the next application that screenshot of your computer screen will be saved in the database and displayed in a special a
, when the corresponding entry is selected in a
, which will display all the records of the images stored in the database .
Thus we have a database table with the following fields:
- the name stored in the database file data;
- a field for storing images in the database.
If you do not go into detail in the lesson, the most valuable information on this topic at the end of mainwindow.cpp file in the following methods:
- the profile of the project;
- header file wrapper class for working with the database;
- file source wrapper class codes for the work with the database;
- header file of the main application window;
- file source code of the main application window;
- form the main application window;
- the main file of the application source code.