Question: Q4 Using Python and sqlite3 database perform the following: a) Connect to the database company.db and open cursor. b) Create table department with number and

Q4

Using Python and sqlite3 database perform the following:

a) Connect to the database company.db and open cursor. b) Create table department with number and name fields. c) Insert into the department the following values and save. 1 Administration 2 Marketing 3 Operations 4. Accounting d) Create table employee with fields Social Security Number (SSN), Name, Last Name, Salary and department number. e) Populate table employee with the following records and save. Use the executemany() method to do the insertion. 12345 Ali Akbas 5000 3 45123 Ahmet Merinos 3000 4 22223 Haydar Sen 2600 2 11122 Ayse Mordogan 3200 3 22322 Lale Koruk 4000 3 22223 Binnaz Ellibes 3300 2 44231 Aydin Ayaydin 4400 2 56342 Rana Gundogan 5300 1 f) Select from tables department and employee the records with the department name "Operations" and display department name, employee name, lastname and salary. g) Increase (update) the salary of employees whose salary is less than 3500 by 10%.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!