0% found this document useful (0 votes)
11 views22 pages

Dental Management CS PROJECT 2

dental management

Uploaded by

karriechoudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views22 pages

Dental Management CS PROJECT 2

dental management

Uploaded by

karriechoudhary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

MADE BY

KAIRAV CHAUDHARY
XII-B
Certificate
This is to certify that the Project entitled DENTAL
Management System is a bona fide work done by
KAIRAV CHAUDHARY of Class XII-B, Session in partial
fulfillment of CBSE’s Examination 2024-25 and has
been carried out under my direct supervision and
guidance. This report or a similar report on the topic has
not been submitted for any other examination and does
not form a part of any other course undergone by the
candidate.
ACKNOWLEDGEMENT
I would like to extend my sincere and heartfelt
gratitude to my computer science teacher, Mrs.
Anshu sharma, who has helped me in this
endeavor and has always been very cooperative
and without his guidance and help, the project
could not have been what it evolved to be.
I am thankful to my parents for their cooperation
and encouragement.
CONTENTS
∙ System Development Life Cycle
∙ Theory
∙ Hardware and Software used
∙ Python code
∙ Output
∙ Usage
∙ Bibliography
System Development Life Cycle
The Software Development Life Cycle (SDLC)
refers to a methodology with clearly defined
processes for creating high-quality software. In
detail, the SDLC methodology focuses on the
following phases of software development:
Theory

What is Database?

A database is a collection of information related to a particular subject or purpose,


such as tracking customer orders or maintaining a product collection. Using any
RDBMS application software like MS SQL Server, MySQL, Oracle, Sybase etc.,
you can manage all your information from a single database file. Within the file,
divide your data into separate storage containers called tables. You may and
retrieve the data using queries.
A table is a collection of data about a specific topic, such as products or suppliers.
Using a separate table for each topic means you can store that data only once,
which makes your database more efficient and reduces data-entry errors. Table
organizes data into columns (called fields) and rows (called records).
A Primary key is one or more fields whose value or values uniquely identify each
record in a table. In a relationship, a primary key is used to refer to specific record
in one table from another table. A primary key is called foreign key when it is
referred to from another table.
To find and retrieve just the data that meets conditions you specify, including data
from multiple tables, create a query. A query can also update or delete multiple
records at the same time, and perform built-in or custom calculations on your data.
What is RDBMS ?
Stands for "Relational Database Management System." An
RDBMS is a DBMS(Database Management System) designed
specifically for relational or tabular databases.
A relational database refers to a database that stores data in a
structured format, using rows and columns. This makes it easy to
locate and access specific values within the database.

It is "relational" because the values within each table are related


to each other. Tables may also be related to other tables. The
relational structure makes it possible to run queries across
multiple tables at once.
System Implementation

Hardware used:
Laptop with Intel ® i3 processor with inbuilt 4GB RAM

Software's used:
∙ Python 3.9 with MySql connector module. ∙ MySql
∙ MS Word (for documentation)
Python Code
print("***************************Dental Management
System***************************")
print("************By- KAIRAV CHAUDHARY,Class- XII B, Roll no.
27**************")

#To Add Database


import sys
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='12345')
cur=conn.cursor()
if conn.is_connected:
cur.execute("create database dental_management_system")
print("Database created succefully")
#To Create Tables↓
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='12345',database='dental_management_system')
cur=conn.cursor()
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()
#To Insert Values↓

import sys
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',passwd='12345',database='dental_management_system')
cur=conn.cursor()
if conn.is_connected:
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()
#The Main Program
import sys
import mysql.connector as sql
conn=sql.connect(host='localhost',user='root',password='12345',database='dental_management_system')
cur=conn.cursor()
if conn.is_connected:
print(" ▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄▀▄ ")
print(" Dental Management System ")
print(" ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒")
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()
from time import gmtime,strftime
a=strftime("%d %b %Y",gmtime())
b=strftime("%H %M %S",gmtime())
c=strftime("%a ",gmtime())
print('Date : ',a)
print('Day : ',c)
print('Time : ',b)
print()
while(True):
print("1. Add Patients records")
print("2. Add Salary records")
print("3. Veiw Patient Detail")
print("4. Delete patient detail")
print("5. To Exit")
print(" ###################*********#################")
print(" =============================================")
print()
choise=int(input('Enter a option : '))
if choise==1:
print()
print("Patient Details : ")
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')
print('Press enter to continue')
print()
print()
if choise==2:
print()
print("Employee Details : ")
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')
print('Press enter to continue')
print()
print()
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])
print('Press enter to continue')
input()
else:
print()
print("Patient Record Does not 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')
print('Press enter to continue')
print()
print()
if choise==5:
print(" Thank you for using \"DENTAL MANAGEMENT SYSTEM\"")
print(" ==== Program Terminated ====")
break
else:
print('Invalid Password')
print('Tryagain')
elif option==2:
print(" Thank you for using \"DENTAL MANAGEMENT SYSTEM\"")
print(" ==== Program Terminated ====")
sys.exit()
conn.commit()
input()
OUTPUT
1. Welcome screen

2. Login
3. Command screen

4. Adding data
5. Viewing data

6. To delete data
Usage
∙ Open command prompt / Terminal and install mysql
connector for python using:
pip install mysql-connector

∙ Run the program using python 3.9 interpretor.

∙ Follow the on-screen instructions.


BIBLIOGRAPHY

1. https://www.google.com

2. https://en.wikipedia.org

3. Computer Science with Python


by Sumita Arora

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy