This post describes working with a SQLite database. SQLite is my favorite Database Management System (DBMS) because it is powerful and easy to add to any program. This post assumes that you are familiar with relational database design and SQL.
In the first program, I cover the API to write and run SQL queries in a C++ program. In the second, I abstract out some of the repetitive code into a class. In the third I discuss transactions in SQLite and how they can be used to ensure the ACID properties of a database:
Call to Action
Extend the auction program from the second playback to include a method that prints the names and email addresses of all of the users who won an auction. Then write a method that prints item followed by the names and email addresses of anyone who made a bid on the item.
Comments and Feedback
You can find all of these code playbacks in my free 'book', An Animated Introduction to Programming in C++. I am always looking for feedback so please feel free to comment here or to send me a direct message.
Top comments (0)