An introduction to data preparation
In the previous chapters, we covered using MySQL Shell in JavaScript mode, which we will use again in this chapter. We also covered connecting Microsoft Excel and Microsoft Access to the MySQL database directly. In this chapter, we will use CSV files to import and export data. Excel can be used to create and read these files.
When working with databases, it is essential to be able to import and export data. This can be when you are working on a new application and need some test data that you manually insert, when you are exporting data to a spreadsheet application that can be sent via email, or when importing data that is collected by something else such as a hardware device to then allow you to create reports. When working with multiple database instances, it may be necessary to copy data from a development setup to a production instance or vice versa.
In this chapter, we will see how to insert a single record, multiple records, and documents...