Summary
In this chapter, we learned how to interface our database with other analytical tools for further analysis and visualization. While SQL is powerful, there will still be those odd analyses which need to be undertaken in other systems. To solve this problem, SQL allows you to transfer data in and out of the database for whatever tasks you may require.
Initially, we looked at how we can use the psql
command-line tool to query our database. From there, we were able to explore the COPY
command and the psql
-specific \copy
command, which enabled us to import and export data to and from our database in bulk. Next, we looked at programmatically accessing our database using analytical software such as R and Python. From there, we were able to explore some of the advanced functionality in Python, including SQLAlchemy and pandas, which enabled us to perform data visualization.
In the next chapter, we will examine data structures that can be used to store complex relationships in...