Activity 01
Hands-on Connection Script
Students write a Python script to connect to SQLite and print a success message. They test it and note any errors. Extend to MySQL if lab setup allows.
Explain the steps involved in connecting a Python application to a SQL database.
Facilitation TipDuring Hands-on Connection Script, circulate and ask students to explain why their connection parameters differ between MySQL and SQLite.
What to look forAsk students to write down the Python import statement for both MySQL and SQLite. Then, have them list the essential parameters needed to establish a connection for each.