Database Connectivity in Python: A Comprehensive Guide