Download MetaTrader 5

New article - SQL and MQL5: Working with SQLite Database

To add comments, please log in or register
MetaQuotes Software Corp.
MetaQuotes Software Corp.  

New article SQL and MQL5: Working with SQLite Database has been published at

This article is intended for developers who would be interested in using SQL in their projects. It explains the functionality and advantages of SQLite. The article does not require special knowledge of SQLite functions, yet minimum understanding of SQL would be beneficial.

Many developers consider using databases in their projects for data storage purposes and yet they remain hesitant about this, knowing how much extra time the SQL server installation may require. And whereas it may not be so difficult for programmers (if a database management system (DBMS) has already been installed for other purposes), it will certainly be an issue for a common user who might eventually be discouraged to install the software altogether.

So many developers choose not to deal with DBMS realizing that solutions they are currently working on will be used by very few people. As a result, they turn to working with files (often having to deal with more than one file, given the variety of data used): CSV, less often XML or JSON, or binary data files with strict structure size, etc.

However, it turns out there is a great alternative to SQL server! And you do not even need to install additional software as everything is done locally in your project, while still allowing you to use the full power of SQL. We are talking about SQLite.

The purpose of this article is to quickly get you started with SQLite. I will therefore not go into subtleties and all imaginable parameter sets and function flags but instead will create a light connection wrapper to execute SQL commands and will demonstrate its use.

To proceed with the article, you need to:

  • Be in a good mood ;)
  • Extract the archive files attached to the article to the MetaTrader 5 client terminal folder
  • Install any convenient SQLite Viewer (e.g. SQLiteStudio)
  • Add the official documentation on SQLite to Favorites

Author: o_O

To add comments, please log in or register