Reading table data from a MySQL database

Data can be stored in database tables also. This recipe demonstrates how we can read data from a table in MySQL.

Getting ready

In order to perform this recipe, we will require the following:

  1. Download and install MySQL community server from The version used in this recipe is 5.7.15.
  2. Create a database named data_science. In this database, create a table named books that contains data as follows:

    Getting ready

    The choice of the field types does not matter for this recipe, but the names of the fields need to exactly match those from the exhibit shown here.

  3. Download the platform independent ...

Get Java Data Science Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.