Ans 7: A database can be accessed by many programs simultaneously and hence to represent the unique session with a database connected from within a script or program we need connection to an SQL database to get data from a table.
Ans 8: pymysql is a python library also called database connecter used for connecting MySQL database server with a python script or program.