Advanced level school Python programming. need helps
A large company currently keeps records on paper of all the computing equipment it owns. Every computer device has its information recorded when it is purchased. The company decided to trial a database to manage its computing equipment records. It is expected that the database should be normalised. When a computer device is purchased, the following information is recorded: - SerialNumber - unique serial number of device - Type - type of device ('Monitor', 'Laptop' or 'Printer') - Model-model of device - Location - where the device is used - DateofPurchase - date of purchase - WrittenOff - whether the device is still in use ('TRUE' means device is written off and NOT in use, 'FALSE' means device is still in use) For monitors, the following extra information is recorded: - Datecleaned - the last date the monitor was cleaned For laptops, the following extra information is recorded: - WeightKg - the weight in kilograms For printers, the following extra information is recorded: - Toner - type of toner required - Datechanged - the last date the toner cartridge was changed The information is to be stored in four different tables: Device Monitor Laptop Printer Task 4.1 Create an SQL file called TASK4_1_
__.sql to show the SQL code to create the database equipment. db with the four tables. The table, Device, nust use SerialNumber as its primary key. The other tables must refer to the SerialNumber as a foreign key. Save your SQL code as TASK4_1___.sql Task 4.2 The files MONITORS.txt, LAPTOPS.txt and PRINTERS.txt contain information about the company's monitors, laptops and printers respectively for insertion into the equipment database. Each row in the three files is a comma-separated list of information about a single device. For MONITORS. txt, information about each monitor is given in the following order: SerialNumber, Model, Location, DateofPurchase, WrittenOff, DateCleaned For LAPTOPS . txt, information about each laptop is given in the following order: SerialNumber, Model, Location, DateofPurchase, Writtenoff,WeightKg For PRINTERS. txt, information about each printer is given in the following order: SerialNumber, Model, Location, DateofPurchase, Writtenoff, Toner, DateChanged Write a Python program to insert all information from the three files into the equipment database, equipment.db. Run the program. Save your program code as TASK4_2___.py Task 4.3 Write SQL code to show the serial number, model and the location of each monitor, with the date it was last cleaned. Run this query. Save this code as TASK4_3___.sql Task 4.4 The company wants to filter the devices by Location and display the results in a web browser. Write a Python program and the necessary files to create a web application that: - receives a Location string from a HTML form, then - creates and returns a HTML document that enables the web browser to display a table tabulating the SerialNumber and Type of devices still in use at that exact Location Save your Python program as TASK4_4___.py with any additional files / sub-folders as needed in a folder named TASK4_4___ Run the web application. Save the output of the program when "Office 51 " is entered as the Location as TASK4_4___.html A large company currently keeps records on paper of all the computing equipment it owns. Every computer device has its information recorded when it is purchased. The company decided to trial a database to manage its computing equipment records. It is expected that the database should be normalised. When a computer device is purchased, the following information is recorded: - SerialNumber - unique serial number of device - Type - type of device ('Monitor', 'Laptop' or 'Printer') - Model-model of device - Location - where the device is used - DateofPurchase - date of purchase - WrittenOff - whether the device is still in use ('TRUE' means device is written off and NOT in use, 'FALSE' means device is still in use) For monitors, the following extra information is recorded: - Datecleaned - the last date the monitor was cleaned For laptops, the following extra information is recorded: - WeightKg - the weight in kilograms For printers, the following extra information is recorded: - Toner - type of toner required - Datechanged - the last date the toner cartridge was changed The information is to be stored in four different tables: Device Monitor Laptop Printer Task 4.1 Create an SQL file called TASK4_1___.sql to show the SQL code to create the database equipment. db with the four tables. The table, Device, nust use SerialNumber as its primary key. The other tables must refer to the SerialNumber as a foreign key. Save your SQL code as TASK4_1___.sql Task 4.2 The files MONITORS.txt, LAPTOPS.txt and PRINTERS.txt contain information about the company's monitors, laptops and printers respectively for insertion into the equipment database. Each row in the three files is a comma-separated list of information about a single device. For MONITORS. txt, information about each monitor is given in the following order: SerialNumber, Model, Location, DateofPurchase, WrittenOff, DateCleaned For LAPTOPS . txt, information about each laptop is given in the following order: SerialNumber, Model, Location, DateofPurchase, Writtenoff,WeightKg For PRINTERS. txt, information about each printer is given in the following order: SerialNumber, Model, Location, DateofPurchase, Writtenoff, Toner, DateChanged Write a Python program to insert all information from the three files into the equipment database, equipment.db. Run the program. Save your program code as TASK4_2___.py Task 4.3 Write SQL code to show the serial number, model and the location of each monitor, with the date it was last cleaned. Run this query. Save this code as TASK4_3___.sql Task 4.4 The company wants to filter the devices by Location and display the results in a web browser. Write a Python program and the necessary files to create a web application that: - receives a Location string from a HTML form, then - creates and returns a HTML document that enables the web browser to display a table tabulating the SerialNumber and Type of devices still in use at that exact Location Save your Python program as TASK4_4___.py with any additional files / sub-folders as needed in a folder named TASK4_4___ Run the web application. Save the output of the program when "Office 51 " is entered as the Location as TASK4_4___.html