CS Project
CS Project
1. ACKNOWLEDGEMENT
2. INTRODUCTION
3. SOFTWARE
4. WORKING ENVIRONMENT
▪ Existing System
▪ Drawbacks
▪ Proposed System
6. SOURCE CODE
7. CONLUSION
8. BIBLIOGRAPHY
ACKNOWLEDGEMENT
This compilation project on “EMPLOYEE DATABASE” is a
mere result of hard work of an individual.
Drawbacks:
Employee record system has a user-friendly application
interface. But it cannot be operated by mouse as it is a
command line-based program.
SOURCE CODE
import mysql.connector as mycon
import os #The module’s function is used at the end for pausing
the system for some time after the output displays
print(con)
cur = con.cursor()
cur.execute("CREATE DATABASE IF NOT EXISTS office")
cur.execute("USE office")
cur.execute("CREATE TABLE IF NOT EXISTS employee(employeeno
integer(4), name varchar(25), age int(4), address varchar(30), dept
varchar(20), salary int(10))")
user = 'y'
print("\n########### WELCOME TO OFFICE DATABASE MANAGEMENT SYSTEM
############\n\n")
After adding employee details, the data in the SQL database that is
connected with the program changes.
The table will be as follows:
Option 2: Update record
Option 3: Delete record
The SQL database connected with the program is updated when the
employee details are updated in the program.
The program closes only after pressing any key because of the
function system(“pause”) from the module os . This code is used
here for pausing the system for a while after the output has been
displayed. A command prompt window opens up asking to press any
key.
Websites:
▪ www.python.org
▪ www.stackoverflow.com
▪ www.mysql.com
▪ www.tutorialspoint.com
▪ www.javapoint.com
▪ www.geeksforgeeks.com
▪ www.w3schools.com
▪ www.wikipedia.com
Books:
▪ Computer Science with Python (Class XII) – By Preeti
Aurora
Other:
▪ Friends