One of the first languages that I've learned is C++. I use C++ for coding in LeetCode, mainly because it's one of the fastest and most memory-efficient languages. C++ holds a special place in my heart and is one of my all-time favorite languages. While coming up with the idea for this project, I also set a goal to make this project as clean and memory efficient as possible. This goal led me to integrate the components of this project using polymorphism and different file structures while also learning about how to properly manage the memory. Using a combination of memory addresses, pointers, and more has greatly improved the memory management of this project. Not only has this project helped me learn how to implement better file and memory management, but also provided a solid understanding on how SQL structures work!
But anyway, let's get into the process. To create this project, I first researched some commands to implement. Then, I created a file structure plan in order to plan how to implement each part of the project. Lastly, using a series of hpp files for the command structures and cpp files to implement the command structure.
While creating this project, I had some minor difficulties with implementing the file structures. Before this project, I had never seen or used hpp files in my C++ projects, and as such, I had no idea how to implement them. However, through research, this problem became quite trivial. The next issue I had was the memory implementation. While creating the project, I consistently checked if my memory was being used favorably, but that proved to be quite a hassle in the long run.
- C++
To run this code, you need to have a C++ compiler installed. I reccomend following this tutorial. Even if you have a different code editor, follow this tutorial to download MinGW and run the code below in your terminal.
git clone https://github.com/aakashvishcoder/mini-sql-database.git
cd mini-sql-database
g++ execute.cpp -o run
./run # On Linux/macOS
run.exe # On Windows