<jupyter_start><jupyter_text>Data<jupyter_code>classroom_data = [(1, "Raj", "M",70, 84,92),
                 (2, "Poonam", "F",87, 69,93),
                 (3, "Nik", "M",65, 83,90),
                 (4, "Rahul", "F",83, 76,89)]

connection = sqlite3.connect("classroomDB.db")
cursor = connection.cursor()
for student in classroom_data:
    insert_statement = """INSERT INTO classroom (student_id, name, gender, physics_marks,chemistry_marks,mathematics_marks)
    VALUES
    ({0},"{1}","{2}",{3},{4},{5})""".format(student[0], student[1], student[2], student[3], student[4], student[5])
    
    cursor.execute(insert_statement)
    
connection.commit()
connection.close()<jupyter_output><empty_output><jupyter_text>Extract Data<jupyter_code>connection = sqlite3.connect("classroomDB.db")
cursor = connection.cursor()
query = "select * from classroom"

cursor.execute(query)
result = cursor.fetchall()

for row in result:
    print(row)

connection.close()
!conda install -y -q pymysql
import pymysql
cnx = { 'host': 'mysqldb.c12wj3xlqsae.us-west-2.rds.amazonaws.com', 'username': 'test', 'password': '<PASSWORD>', 'db':'classroomDB'}

connection = pymysql.connect(cnx['host'],cnx['username'],cnx['password'],cnx['db'])

connection.close()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18740157480314962, 'fraction_numerical': 0.03622047244094488, 'mean_word_length': 5.323383084577115, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '113252', 'license': 'MIT', 'n_tokens_mistral': 482, 'n_tokens_neox': 460, 'n_words': 78, 'path': 'notebooks/Extracting Data from relational Databases.ipynb', 'repo_name': 'darshangit/Titanic-DS', 'size': '1270'}