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:
- Download and install MySQL community server from http://dev.mysql.com/downloads/mysql/. The version used in this recipe is 5.7.15.
- Create a database named
data_science
. In this database, create a table namedbooks
that contains data as follows: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.
- Download the platform independent ...
Get Java Data Science Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.