You are on page 1of 30

1.

INTRODUCTION

1.1 ABOUT THE PROJECT

Now a day’s education plays a great role in development of any country. Many of
education organizations try to increase education quality. One of the aspects of this
improvement is managing of school resources.

Education Management System carried on by any individual or institution engaged in


providing services to students. Education Management System (EMS) is such a service which
provides all services for an educational institute to make your life easier and faster by
assuring its performance. Easy User Management System, Easy Admission Process.

We use database and database technology are having a major impact on the growing
use of computers. The implementation of the system was done using Python and SQLite
allowing system to be run in Windows OS.

In a nutshell, Education Management Software managed your education institution by


simplifying and automating processes and addressing the needs of all stakeholders helping
them to be more efficient in their respective roles.

1
2. SYSTEM ANALYSIS

2.1 FEASIBILTY STUDY


A feasibility analysis usually involves a thorough assessment of the operational(need),
financial and technical aspects of a proposal. Feasibility study is the test of the system
proposal made to identify whether the user needs may be satisfied using the current software
and hardware technologies, whether the system will be cost effective from a business point of
view and whether it can be developed with the given budgetary constraints. A feasibility
study should be relatively cheap and done at the earliest possible time. Depending on the
study, the decision is made whether to go ahead with a more detailed analysis.
When a new project is proposed, it normally goes through feasibility assessment.
Feasibility study is carried out to determine whether the proposed system is possible to
develop with available resources and what should be the cost consideration. Facts considered
in the feasibility analysis were.
 Technical Feasibility
 Economic Feasibility
 Behavioral Feasibility

Technical Feasibility
Technical Feasibility deals with the hardware as well as software requirements.
Technology is not a constraint to type system development. To find out whether the
necessary technology, the proposed equipments have the capacity to hold the data, which is
used in the project, should be checked to carry out this technical feasibility.
The technical feasibility issues usually raised during the feasibility stage of
investigation includes these
 This software is running in windows 7 Operating System, which can be easily
installed.
 The hardware required is Pentium based server.
 The system can be expanded.

2
Economical Feasibility
This feasibility study present tangible and intangible benefits from the prefect by
comparing the development and operational cost. The technique of cost benefit analysis is
often used as a basis for assessing economic feasibility. This system needs some more initial
investment than the existing system, but it can be justifiable that it will improve quality of
service.
Thus feasibility study should center along the following points:
 Improvement resulting over the existing method in terms of accuracy,
timeliness.
 Cost comparison
 Estimate on the life expectancy of the hardware
 Overall objective
Our project is economically feasible. It does not require much cost to be involved in the
overall process. The overall objectives are in easing out the requirement processes.

Behavioral/ Operational Feasibility


This analysis involves how it will work when it is installed and the assessment of
political and managerial environment in which it is implemented. People are inherently
resistant to change and computers have been known to facilitate change. The new proposed
system is very much useful to the useful to the users and there for it will accept broad
audience from around the world.

3
2.2 PROPOSED SYSTEM

The system is completed under the guidance of the theory and methods of
management information systems, database technology support. This project first discusses
the structure of the background, purpose and significance of the graduate design topics. Then
describes the development platform and database technology and the advantages of each,
followed by more devoted a system requirements analysis, design, implementation, and the
implementation of the tasks, techniques and tools. End system to complete the information
input, output, data modification, query and statistics, as well as print statements, make
operation simple and quick.

In this project, we try to build up sound software which can operate any challenging
situation in the modern time. Administrator and users information are making effective
decisions. The decisions are more accurate, relevant and timely the information stored or
process is more effective.

4
3. SYSTEM ENVIRONMENT

3.1 HARDWARE REQUIREMENTS

The hardware used for the development of the project is:


Processor : Intel Core i3

RAM capacity : 4 GB

Hard disk drive : 1TB

Keyboard : Multi Media

Mouse : Optical

Monitor : 17” Color

3.2 SOFTWARE REQUIREMENTS

The software used for the development of the project is:

Coding : Python

Operating System : Windows

Back End : SQLite

5
3.3 SOFTWARE SPECIFICATION

FRONT END

Python is an interpreted, object-oriented, high-level programming language with


dynamic semantics. Its high-level built in data structures, combined with dynamic typing and
dynamic binding, make it very attractive for Rapid Application Development, as well as for
use as a scripting or glue language to connect existing components together. Python's simple,
easy to learn syntax emphasizes readability and therefore reduces the cost of program
maintenance. Python supports modules and packages, which encourages program modularity
and code reuse. The Python interpreter and the extensive standard library are available in
source or binary form without charge for all major platforms, and can be freely distributed.

Often, programmers fall in love with Python because of the increased productivity it
provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast.
Debugging Python programs is easy: a bug or bad input will never cause a segmentation
fault. Instead, when the interpreter discovers an error, it raises an exception. When the
program doesn't catch the exception, the interpreter prints a stack trace. A source level
debugger allows inspection of local and global variables, evaluation of arbitrary expressions,
setting breakpoints, stepping through the code a line at a time, and so on. The debugger is
written in Python itself, testifying to Python's introspective power. On the other hand, often
the quickest way to debug a program is to add a few print statements to the source: the fast
edit-test-debug cycle makes this simple approach very effective.

Python is a multi-paradigm programming language. Object-oriented programming


and structured programming are fully supported, and many of its features support functional
programming and aspect-oriented programming (including by meta programming and meta
objects (magic methods)). Many other paradigms are supported via extensions, including
design by contract and logic programming.

Python uses dynamic typing and a combination of reference counting and a cycle-
detecting garbage collector for memory management. It also features dynamic name
resolution (late binding), which binds method and variable names during program execution.

6
Python's design offers some support for functional programming in the Lisp tradition.
It has filter, map, and reduce functions; list comprehensions, dictionaries, sets, and generator
expressions. The standard library has two modules (itertools and functools) that implement
functional tools borrowed from Haskell and Standard ML.[56]

The language's core philosophy is summarized in the document The Zen of Python
(PEP 20), which includes aphorisms such as:

 Beautiful is better than ugly.


 Explicit is better than implicit.
 Simple is better than complex.
 Complex is better than complicated.
 Readability counts.

Rather than having all of its functionality built into its core, Python was designed to
be highly extensible. This compact modularity has made it particularly popular as a means of
adding programmable interfaces to existing applications. Van Rossum's vision of a small core
language with a large standard library and easily extensible interpreter stemmed from his
frustrations with ABC, which espoused the opposite approach.

Python strives for a simpler, less-cluttered syntax and grammar while giving
developers a choice in their coding methodology. In contrast to Perl's "there is more than one
way to do it" motto, Python embraces a "there should be one—and preferably only one—
obvious way to do it" design philosophy. Alex Martelli, a Fellow at the Python Software
Foundation and Python book author, writes that "To describe something as 'clever' is not
considered a compliment in the Python culture."

Python's developers strive to avoid premature optimization, and reject patches to non-
critical parts of the C Python reference implementation that would offer marginal increases in
speed at the cost of clarity.[59] When speed is important, a Python programmer can move time-
critical functions to extension modules written in languages such as C, or use PyPy, a just-in-
time compiler. Cython is also available, which translates a Python script into C and makes
direct C-level API calls into the Python interpreter.

7
An important goal of Python's developers is keeping it fun to use. This is reflected in
the language's name—a tribute to the British comedy group Monty Python[60]—and in
occasionally playful approaches to tutorials and reference materials, such as examples that
refer to spam and eggs (from a famous Monty Python sketch) instead of the standard foo and
bar.[61][62]

A common neologism in the Python community is pythonic, which can have a wide
range of meanings related to program style. To say that code is pythonic is to say that it uses
Python idioms well, that it is natural or shows fluency in the language, that it conforms with
Python's minimalist philosophy and emphasis on readability. In contrast, code that is difficult
to understand or reads like a rough transcription from another programming language is
called unpythonic.

Users and admirers of Python, especially those considered knowledgeable or


experienced, are often referred to as Pythonistas

Statements and control flow

Python's statements include (among others):

 The assignment statement (token '=', the equals sign). This operates differently than in
traditional imperative programming languages, and this fundamental mechanism
(including the nature of Python's version of variables) illuminates many other features
of the language. Assignment in C, e.g., x = 2, translates to "typed variable name x
receives a copy of numeric value 2". The (right-hand) value is copied into an allocated
storage location for which the (left-hand) variable name is the symbolic address. The
memory allocated to the variable is large enough (potentially quite large) for the
declared type. In the simplest case of Python assignment, using the same example, x =
2, translates to "(generic) name x receives a reference to a separate, dynamically
allocated object of numeric (int) type of value 2." This is termed binding the name to
the object. Since the name's storage location doesn't contain the indicated value, it is
improper to call it a variable. Names may be subsequently rebound at any time to
objects of greatly varying types, including strings, procedures, complex objects with
data and methods, etc. Successive assignments of a common value to multiple names,
e.g., x = 2; y = 2; z = 2 result in allocating storage to (at most) three names and one

8
numeric object, to which all three names are bound. Since a name is a generic
reference holder it is unreasonable to associate a fixed data type with it. However at a
given time a name will be bound to some object, which will have a type; thus there is
dynamic typing.
 The if statement, which conditionally executes a block of code, along with else and
elif (a contraction of else-if).
 The for statement, which iterates over an iterable object, capturing each element to a
local variable for use by the attached block.
 The while statement, which executes a block of code as long as its condition is true.
 The try statement, which allows exceptions raised in its attached code block to be
caught and handled by except clauses; it also ensures that clean-up code in a finally
block will always be run regardless of how the block exits.
 The raise statement, used to raise a specified exception or re-raise a caught exception.
 The class statement, which executes a block of code and attaches its local namespace
to a class, for use in object-oriented programming.
 The def statement, which defines a function or method.
 The with statement, from Python 2.5 released in September 2006, which encloses a
code block within a context manager (for example, acquiring a lock before the block
of code is run and releasing the lock afterwards, or opening a file and then closing it),
allowing Resource Acquisition Is Initialization (RAII)-like behavior and replaces a
common try/finally idiom.[68]
 The break statement, exits from the loop.
 The continue statement, skips this iteration and continues with the next item.
 The pass statement, which serves as a NOP. It is syntactically needed to create an
empty code block.
 The assert statement, used during debugging to check for conditions that ought to
apply.
 The yield statement, which returns a value from a generator function. From Python
2.5, yield is also an operator. This form is used to implement coroutines.
 The import statement, which is used to import modules whose functions or variables
can be used in the current program. There are three ways of using import: import
<module name> [as <alias>] or from <module name> import * or from <module
name> import <definition 1> [as <alias 1>], <definition 2> [as <alias 2>], ....
 The print statement was changed to the print() function in Python 3.
9
Python does not support tail call optimization or first-class continuations, and,
according to Guido van Rossum, it never will. However, better support for coroutine-like
functionality is provided in 2.5, by extending Python's generators. Before 2.5, generators
were lazy iterators; information was passed unidirectionally out of the generator. From
Python 2.5, it is possible to pass information back into a generator function, and from Python
3.3, the information can be passed through multiple stack levels.

Libraries

Python's large standard library, commonly cited as one of its greatest strengths,[101]
provides tools suited to many tasks. For Internet-facing applications, many standard formats
and protocols such as MIME and HTTP are supported. It includes modules for creating
graphical user interfaces, connecting to relational databases, generating pseudorandom
numbers, arithmetic with arbitrary-precision decimals,[102] manipulating regular expressions,
and unit testing.

Some parts of the standard library are covered by specifications (for example, the Web Server
Gateway Interface (WSGI) implementation wsgiref follows PEP 333[103]), but most modules
are not. They are specified by their code, internal documentation, and test suites. However,
because most of the standard library is cross-platform Python code, only a few modules need
altering or rewriting for variant implementations.

As of November 2019, the Python Package Index (PyPI), the official repository for
third-party Python software, contains over 200,000 packages with a wide range of
functionality, including:

 Automation  Multimedia
 Data analytics  Networking
 Databases  Scientific computing
 Documentation  System administration
 Graphical user interfaces  Test frameworks
 Image processing  Text processing
 Machine learning  Web frameworks
 Mobile App  Web scraping

10
Cross-compilers to other languages

 Cython compiles Python to C and C++.


 Google's Grumpy compiles Python to Go.
 IronPython follows a similar approach in order to run Python programs on the .NET
Common Language Runtime.
 Jython enables the use of the Java class library from a Python program.
 MyHDL compiles Python to VHDL.
 Nuitka compiles Python into C++.
 Numba uses LLVM to compile Python to machine code.
 Pyjs compiles Python to JavaScript.
 Pyrex (latest release in 2010) and Shed Skin (latest release in 2013) compile to C and
C++ respectively.
 Pythran compiles Python to C++.
 RPython can be compiled to C, and is used to build the PyPy interpreter of Python.

Languages influenced by Python

 Boo uses indentation, a similar syntax, and a similar object model.


 Cobra uses indentation and a similar syntax, and its Acknowledgements document
lists Python first among languages that influenced it.
 CoffeeScript, a programming language that cross-compiles to JavaScript, has Python-
inspired syntax.
 ECMAScript/JavaScript borrowed iterators and generators from Python.
 GDScript, a scripting language very similar to Python, built-in to the Godot game
engine.
 Go is designed for the "speed of working in a dynamic language like Python" and
shares the same syntax for slicing arrays.
 Groovy was motivated by the desire to bring the Python design philosophy to Java.
 Julia was designed to be "as usable for general programming as Python".
 Nim uses indentation and a similar syntax.
 Ruby's creator, Yukihiro Matsumoto, has said: "I wanted a scripting language that
was more powerful than Perl, and more object-oriented than Python. That's why I
decided to design my own language."Swift, a programming language developed by
Apple, has some Python-inspired syntax.

11
BACK END

SQLite
INTRODUCTON
SQLiteis a relational database management system contained in a C programming
library. In contrast to many other database management systems, SQLite is not a client–
server database engine. Rather, it is embedded into the end program.SQLite is ACID-
compliant and implements most of the SQL standard, using a dynamically and weakly
typed SQL syntax that does not guarantee the domain integrity.

DESIGN
Unlike client–server database management systems, the SQLite engine has no
standalone processes with which the application program communicates. Instead, the
SQLite library is linked in and thus becomes an integral part of the application program.
The library can also be called dynamically. Due to the server-less design, SQLite
applications require fewer configurations than client-server databases. SQLite is called
zero-conf[7]because it does not require service management (such as startup scripts) or
access control based on GRANT and passwords. Several computer processes or threads
may access the same database concurrently. Several read accesses can be satisfied in
parallel. A write access can only be satisfied if no other accesses are currently being
serviced. Otherwise, the write access fails with an error code (or can automatically be
retried until a configurable timeout expires). This concurrent access situation would
change when dealing with temporary tables. This restriction is relaxed in version 3.7
when write-ahead logging (WAL) is turned on enabling concurrent reads and writes.

12
4. SYSTEM DESIGN
4.1 INPUT DESIGN
In the input design, user-oriented inputs are converted into a computer based system
format. It also includes determining the record media, method of input, speed of capture and
entry on to the screen. Online data entry accepts commands and data through a keyboard. The
major approach to input design is the menu and the prompt design. In each alternative, the
user’s options are predefined. The data flow diagram indicates logical data flow, data stores,
source and destination. Input data are collected and organized into a group of similar data.
Once identified input media are selected for processing.
In this software, importance is given to develop Graphical User Interface (GUI),
which is an important factor in developing efficient and user-friendly software. For inputting
user data, attractive forms are designed. User can also select desired options from the menu,
which provides all possible facilities.
Also the important input format is designed in such a way that accidental errors are
avoided. The user has to input only just the minimum data required, which also helps in
avoiding the errors that the users may make. Accurate designing of the input format is very
important in developing efficient software. The goal or input design is to make entry as easy,
logical and free from errors.

4.2 OUTPUT DESIGN


In the output design, the emphasis is on producing a hard copy of the information
requested or displaying the output on the CRT screen in a predetermined format. Two of the
most output media today are printers and the screen. Most users now access their reports from
a hard copy or screen display. Computer’s output is the most important and direct source of
information to the user, efficient, logical, output design should improve the systems relations
with the user and help in decision-making.
As the outputs are the most important source of information to the user, better design
should improve the system’s relation and also should help in decision-making. The output
device’s capability, print capability, print capability, response time requirements etc should
also be considered form design elaborates the way output is presented and layout available
for capturing information. It’s very helpful to produce the clear, accurate and speedy
information for end users.

13
4.3 DATABASE DESIGN

Database design is the process of producing a detailed data model of a database.


Logical data model contains all the needed logical and physical design choices and physical
storage parameters needed a design in a Definition Language, Which can then be used to
create a database. A fully attributed data model contains detailed attributes for each entity.

14
4.4 DATA FLOW DIAGRAM
A Data Flow Diagram (DFD) is a diagram that describes the flow of data and the
processes that change data throughout a system. It’s a structured analysis and design tool that
can be used for flowcharting in place of or in association with information. Oriented and
process oriented system flowcharts. When analysts prepare the Data Flow Diagram, they
specify the user needs at a level of detail that virtually determines the information flow into
and out of the system and the required data resources. This network is constructed by using a
set of symbols that do not imply physical implementations. The Data Flow Diagram reviews
the current physical system, prepares input and output specification, specifies the
implementation plan etc.

15
5. SYSTEM SPECIFATION
1) ADD DETAILS MODULE

This module is used to store student and stream details in the school. It has

the fields such as student name, contact number, email address, gender, date of

birth, stream.

2) UPDATE DETAILS MODULE

This module is used to update student and stream details in the school. It has the

fields such as student name , contact number, email address, gender, date of birth,

stream.

3) VIEW DETAILS MODULE

This module is used to view student and stream details in the school. It has the

fields such as student name, contact number, email address, gender, date of birth,

stream.

4) DELETE DETAILS MODULE

This module is used to delete the employee details such as employee id, name, date

of joining, Age, Mail, Contact number and address for communication.

5) RESET DETAILS MODULE


This module is used to clear the all fields displayed on the screen.

16
8. CONCLUSION

The application Education Management Software is the total package for the school
or college management system requirements. With the help of menu bar users can interact
with software very easily almost every object has been provided with tool bar. This
application is also supports terminal services so that database will be more secure by
centralized the database. In fine we want to say we are not yet an experienced system analyst,
but tried our best to fulfill this project.

17
9. BIBILIOGRAPHY
Reference Books

 Python Crash Course. 'Python Crash Course' by Eric Matthews is a fast-paced and
comprehensive introduction to Python language for beginners who wish to learn
Python programming and write useful ...

 Automate the Boring Stuff with Python, 2nd Edition: Practical Programming for Total
Beginners. ...

 Learning Python, 5th Edition. The author of the book, Mark Lutz, gives a
comprehensive, in-depth introduction to the core Python language based on his
training course.

 Head-First Python (2nd edition) Head-First Python by Paul Barry is the best book to
learn python, a quick and easy fix for you if you wish to learn the ...

 Elements of Programming Interviews in Python: The Insiders' Guide. The book


challenges you with a collection of 250 problems to test your Python skills

Reference Websites

[1] http://www.tutorialspoint.com/python

[2] https://www.w3schools.com/python

[3] https://www.learnpython.org

[4] https://www.programiz.com

18
10. APPENDIX

SCREENSHOTS

19
View Records

20
Delete Records

21
Delete Database

22
Source Code
import datetime
from tkinter import *
import tkinter.messagebox as mb
from tkinter import ttk
from tkcalendar import DateEntry  # pip install tkcalendar
import sqlite3

# Creating the universal font variables
headlabelfont = ("Noto Sans CJK TC", 15, 'bold')
labelfont = ('Garamond', 14)
entryfont = ('Garamond', 12)

# Connecting to the Database where all information will be stored
connector = sqlite3.connect('SchoolManagement.db')
cursor = connector.cursor()

connector.execute(
"CREATE TABLE IF NOT EXISTS SCHOOL_MANAGEMENT (STUDENT_ID INTEGER PR
IMARY KEY AUTOINCREMENT NOT NULL, NAME TEXT, EMAIL TEXT, PHONE_NO TE
XT, GENDER TEXT, DOB TEXT, STREAM TEXT)"
)

# Creating the functions
def reset_fields():
    global name_strvar, email_strvar, contact_strvar, gender_strvar, 
dob, stream_strvar

    for i in ['name_strvar', 'email_strvar', 'contact_strvar', 'gend
er_strvar', 'stream_strvar']:
        exec(f"{i}.set('')")
    dob.set_date(datetime.datetime.now().date())

23
def reset_form():
    global tree
    tree.delete(*tree.get_children())

    reset_fields()

def display_records():
    tree.delete(*tree.get_children())

    curr = connector.execute('SELECT * FROM SCHOOL_MANAGEMENT')
    data = curr.fetchall()

    for records in data:
        tree.insert('', END, values=records)

def add_record():
    global name_strvar, email_strvar, contact_strvar, gender_strvar, 
dob, stream_strvar

    name = name_strvar.get()
    email = email_strvar.get()
    contact = contact_strvar.get()
    gender = gender_strvar.get()
    DOB = dob.get_date()
    stream = stream_strvar.get()

    if not name or not email or not contact or not gender or not DOB 
or not stream:
        mb.showerror('Error!', "Please fill all the missing fields!!
")

24
    else:
        try:
            connector.execute(
            'INSERT INTO SCHOOL_MANAGEMENT (NAME, EMAIL, PHONE_NO, G
ENDER, DOB, STREAM) VALUES (?,?,?,?,?,?)', (name, email, contact, ge
nder, DOB, stream)
            )
            connector.commit()
            mb.showinfo('Record added', f"Record of {name} was succe
ssfully added")
            reset_fields()
            display_records()
        except:
            mb.showerror('Wrong type', 'The type of the values enter
ed is not accurate. Pls note that the contact field can only contain 
numbers')

def remove_record():
    if not tree.selection():
        mb.showerror('Error!', 'Please select an item from the datab
ase')
    else:
        current_item = tree.focus()
        values = tree.item(current_item)
        selection = values["values"]

        tree.delete(current_item)

        connector.execute('DELETE FROM SCHOOL_MANAGEMENT WHERE STUDE
NT_ID=%d' % selection[0])
        connector.commit()

25
        mb.showinfo('Done', 'The record you wanted deleted was succe
ssfully deleted.')

        display_records()

def view_record():
    global name_strvar, email_strvar, contact_strvar, gender_strvar, 
dob, stream_strvar

    current_item = tree.focus()
    values = tree.item(current_item)
    selection = values["values"]

    date = datetime.date(int(selection[5][:4]), int(selection[5]
[5:7]), int(selection[5][8:]))

    name_strvar.set(selection[1]); email_strvar.set(selection[2])
    contact_strvar.set(selection[3]); gender_strvar.set(selection[4]
)
    dob.set_date(date); stream_strvar.set(selection[6])

# Initializing the GUI window
main = Tk()
main.title('DataFlair School Management System')
main.geometry('1000x600')
main.resizable(0, 0)

# Creating the background and foreground color variables
lf_bg = 'MediumSpringGreen' # bg color for the left_frame
cf_bg = 'PaleGreen' # bg color for the center_frame

# Creating the StringVar or IntVar variables

26
name_strvar = StringVar()
email_strvar = StringVar()
contact_strvar = StringVar()
gender_strvar = StringVar()
stream_strvar = StringVar()

# Placing the components in the main window
Label(main, text="SCHOOL MANAGEMENT SYSTEM", font=headlabelfont, bg=
'SpringGreen').pack(side=TOP, fill=X)

left_frame = Frame(main, bg=lf_bg)
left_frame.place(x=0, y=30, relheight=1, relwidth=0.2)

center_frame = Frame(main, bg=cf_bg)
center_frame.place(relx=0.2, y=30, relheight=1, relwidth=0.2)

right_frame = Frame(main, bg="Gray35")
right_frame.place(relx=0.4, y=30, relheight=1, relwidth=0.6)

# Placing components in the left frame
Label(left_frame, text="Name", font=labelfont, bg=lf_bg).place(relx=
0.375, rely=0.05)
Label(left_frame, text="Contact Number", font=labelfont, bg=lf_bg).p
lace(relx=0.175, rely=0.18)
Label(left_frame, text="Email Address", font=labelfont, bg=lf_bg).pl
ace(relx=0.2, rely=0.31)
Label(left_frame, text="Gender", font=labelfont, bg=lf_bg).place(rel
x=0.3, rely=0.44)
Label(left_frame, text="Date of Birth (DOB)", font=labelfont, bg=lf_
bg).place(relx=0.1, rely=0.57)
Label(left_frame, text="Stream", font=labelfont, bg=lf_bg).place(rel
x=0.3, rely=0.7)

27
Entry(left_frame, width=19, textvariable=name_strvar, font=entryfont
).place(x=20, rely=0.1)
Entry(left_frame, width=19, textvariable=contact_strvar, font=entryf
ont).place(x=20, rely=0.23)
Entry(left_frame, width=19, textvariable=email_strvar, font=entryfon
t).place(x=20, rely=0.36)
Entry(left_frame, width=19, textvariable=stream_strvar, font=entryfo
nt).place(x=20, rely=0.75)

OptionMenu(left_frame, gender_strvar, 'Male', "Female").place(x=45, 
rely=0.49, relwidth=0.5)

dob = DateEntry(left_frame, font=("Arial", 12), width=15)
dob.place(x=20, rely=0.62)

Button(left_frame, text='Submit and Add Record', font=labelfont, com
mand=add_record, width=18).place(relx=0.025, rely=0.85)

# Placing components in the center frame
Button(center_frame, text='Delete Record', font=labelfont, command=r
emove_record, width=15).place(relx=0.1, rely=0.25)
Button(center_frame, text='View Record', font=labelfont, command=vie
w_record, width=15).place(relx=0.1, rely=0.35)
Button(center_frame, text='Reset Fields', font=labelfont, command=re
set_fields, width=15).place(relx=0.1, rely=0.45)
Button(center_frame, text='Delete database', font=labelfont, command
=reset_form, width=15).place(relx=0.1, rely=0.55)

# Placing components in the right frame
Label(right_frame, text='Students Records', font=headlabelfont, bg='
DarkGreen', fg='LightCyan').pack(side=TOP, fill=X)

tree = ttk.Treeview(right_frame, height=100, selectmode=BROWSE,

28
                    columns=('Student ID', "Name", "Email Address", 
"Contact Number", "Gender", "Date of Birth", "Stream"))

X_scroller = Scrollbar(tree, orient=HORIZONTAL, command=tree.xview)
Y_scroller = Scrollbar(tree, orient=VERTICAL, command=tree.yview)

X_scroller.pack(side=BOTTOM, fill=X)
Y_scroller.pack(side=RIGHT, fill=Y)

tree.config(yscrollcommand=Y_scroller.set, xscrollcommand=X_scroller
.set)

tree.heading('Student ID', text='ID', anchor=CENTER)
tree.heading('Name', text='Name', anchor=CENTER)
tree.heading('Email Address', text='Email ID', anchor=CENTER)
tree.heading('Contact Number', text='Phone No', anchor=CENTER)
tree.heading('Gender', text='Gender', anchor=CENTER)
tree.heading('Date of Birth', text='DOB', anchor=CENTER)
tree.heading('Stream', text='Stream', anchor=CENTER)

tree.column('#0', width=0, stretch=NO)
tree.column('#1', width=40, stretch=NO)
tree.column('#2', width=140, stretch=NO)
tree.column('#3', width=200, stretch=NO)
tree.column('#4', width=80, stretch=NO)
tree.column('#5', width=80, stretch=NO)
tree.column('#6', width=80, stretch=NO)
tree.column('#7', width=150, stretch=NO)

tree.place(y=30, relwidth=1, relheight=0.9, relx=0)

display_records()

29
# Finalizing the GUI window
main.update()
main.mainloop()

30

You might also like