DENTAL
DENTAL
import sys
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='manager'
)
cur=conn.cursor()
cur.execute("create database dental_management_system")
print("Database created succefully")
conn=sql.connect(host='localhost',user='root',passwd='manager'
,database='dental_management_system')
cur.execute('create table patient_record( Patient_Name
varchar(50),
Age int(3),
Doctor_Conculted varchar(50),
Address varchar(150),
Phone_Number bigint(15))')
cur.execute('create table salary_record( Employee_Name
varchar(50),
Proffession varchar(20),
Salary_Amount varchar(9),
Address varchar(150),
Phone_Number bigint(15))')
cur.execute('create table accounts( User_Name varchar(20)
primary key, password varchar(30) unique)')
print('Tables created successfully')
conn.commit()
user=input("Enter New User Name : ")
user=user.upper()
passwrd=input("Enter New Password : ")
passwrd=passwrd.upper()
cur.execute("insert into accounts values('" + user + "','" +
passwrd + "')")
print("ACCOUNT ADDED SUCCEFULLY")
conn.commit()
if conn.is_connected:
print(" Dental Management
System ")
print("1. Login")
print("2. Exit")
print()
option=int(input("Enter your choise : "))
if option==1:
print()
user=input('User Name : ')
user=user.upper()
cur.execute("select * from accounts where User_Name
like '" + user + "'")
datas=cur.fetchall()
for i in datas:
value_1=i[0]
value_2=i[1]
if user==value_1:
password=input('Password : ')
password=password.upper()
if password==value_2:
print()
print('Login succefull')
print()
print("1. Add Patients records")
print("2. Add Salary records")
print("3. Veiw Patient Detail")
print("4. Delete patient detail")
print()
choise=int(input('Enter a option : '))
if choise==1:
print()
name=input('Name : ')
name=name.upper()
age=int(input('Age : '))
doc=input('Doctor Consulted : ')
doc=doc.upper()
add=input('Address : ')
add=add.upper()
phone_no=int(input('Phone Number : '))
cur.execute("insert into patient_record
values('" + name + "'," + str(age) + ",'" + doc + "','" + add
+ "'," + str(phone_no) + ")")
conn.commit()
print('Record added')
if choise==2:
print()
emp_name=input( 'Employee_Name : ')
emp_name=emp_name.upper()
proffesion=input('Proffession : ')
proffesion=proffesion.upper()
salary=int(input('Salary Amount : '))
add=input('Address : ')
add=add.upper()
phone_no=input( 'Phone_Number : ')
cur.execute("insert into salary_record
values('" + emp_name + "','" + proffesion + "'," + str(salary)
+ ",'" + add + "'," + str(phone_no) + ")")
conn.commit()
print('Record added')
if choise==3:
print()
name=input('Name of the patient : ')
name=name.upper()
cur.execute("select * from patient_record
where patient_name like '" + str(name) + "'")
data=cur.fetchall()
if data!=0:
for row in data:
print()
print("Patient Details : ")
print()
print('Name : ',row[0])
print('Age : ',row[1])
print('Doctor consulted :
',row[2])
print('Address : ',row[3])
print('Phone Number : ',row[4])
input()
else:
print()
print("Patient Record Doesnot Exist")
if choise==4:
print()
name=input('Name of the patient : ')
name=name.upper()
cur.execute("delete from patient_record
where Patient_Name like '" + name + "'")
print('Record Deleted Succefully')
else:
print('Invalid Password')
print('Tryagain')
elif option==2:
sys.exit()
conn.commit()
input()
OUTPUT
OPTION – 1:
OPTION – 2:
OPTION – 3:
TESTING
TESTING METHODS
Software testing methods are traditionally divided into
black box testing and white box testing. These two approaches
are used to describe the point of view that a test engineer
takes when designing test cases.
BLACK BOX TESTING
Black box testing treats the software as a "black box,"
without any knowledge of internal implementation. Black box
testing methods include: equivalence partitioning, boundary
value analysis, all-pairs testing, fuzz testing, model-based
testing, traceability matrix, exploratory testing and
specification-based testing.
SPECIFICATION-BASED TESTING
The black box tester has no "bonds" with the code, and a
tester's perception is very simple: a code must have bugs.
Using the principle, "Ask and you shall receive," black box
testers find bugs where programmers don't. But, on the other
hand, black box testing has been said to be "like a walk in a
dark labyrinth without a flashlight," because the tester
doesn't know how the software being tested was actually
constructed.
That's why there are situations when (1) a black box
tester writes many test cases to check something that can be
tested by only one test case, and/or (2) some parts of the
back end are not tested at all. Therefore, black box testing
has the advantage of "an unaffiliated opinion," on the one
hand, and the disadvantage of "blind exploring," on the other.
INSTALATION PROCEDURE
Dental Management System :-
Pre-Requisites :-
I) mysql.connector
II) matplotlib.
CAUTION :-
If you are running the software through running the
python files or by running the .exe files ; first run the file
named 'Tables_in_mysql'.
I. Windows OS
II. Python
BIBLIOGRAPHY
By : Praveen M Jigajinni
3. Website: https://www.w3resource.com
***