Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

ALUMNI INFORMATION SYSTEM

A PROJECT REPORT

Submitted by
Ashmit Shandilya [Reg No:RA2211030010160]

Satvik [Reg No:RA2211030010176]


Dikshant [Reg No:RA2211030010177]
Under the Guidance of
DR. K. KALAISELVI
Associate Professor , Department of networking and Communications

in partial fulfillment of the requirements for the degree of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING

DEPARTMENT OF COMPUTATIONAL
INTELLIGENCE
COLLEGE OF ENGINEERING AND TECHNOLOGY
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR– 603 203
MAY 2024

1
SRM INSTITUTE OF SCIENCE AND TECHNOLOGY
KATTANKULATHUR–603 203

BONAFIDE CERTIFICATE

Certified to be the bonafide work done by Ashmit Shandilya

(RA2211030010160), Satvik (RA2211030010176), Dikshant

(RA2211030010177) of II year/IV Sem B. Tech Degree Course in the Project

Course – 21CSC205P Database Management Systems in SRM INSTITUTE

OF SCIENCE AND TECHNOLOGY, Kattankulathur for the academic year

2023-2024.

Faculty in Charge HEAD OF THE DEPARTMENT


Dr. K. Kalaiselvi Dr. Annapurani Panaiyappan K
Associate Professor Professor and Head
Department of Networking and Communications Department of Networking and Communications
SRMSIT -KTR SRMIST - KTR

2
ABSTRACT

The Alumni Information System (AIS) is a comprehensive database management project


designed for educational institutions to effectively organize and manage alumni data. AIS
includes modules for registration, profile management, event tracking, and communication
channels, enhancing engagement between alumni and their alma mater. The registration
module allows alumni to create and update profiles, capturing personal, academic, and
professional details. The profile management module enables alumni to maintain their
profiles and connect with other alumni, fostering a sense of community. The event tracking
module streamlines event organization, and the communication channels module facilitates
seamless communication through newsletters, social media, and messaging. AIS ensures
efficient data management with robust storage and advanced search capabilities, while
maintaining data security through encryption techniques. By leveraging AIS, institutions can
strengthen alumni relationships, enrich the educational experience for current students, and
contribute to the long-term success of the institution.

3
PROBLEM STATEMENT

The proposed project aims to develop a robust Alumni Information System that
enables educational institutions or alumni associations to efficiently manage and
organize information about their graduates. The primary objective is to create a user-
friendly graphical interface using Python’s Tkinter library, which allows users to
securely log in, add, retrieve, update, and delete alumni records. A critical
requirement of the system is the integration with a SQLite database to ensure data
persistence and integrity, enabling real-time operations like searching, sorting, and
filtering of alumni details based on multiple criteria such as name, graduation year,
and contact information. The system must also include data validation features to
prevent incorrect data entries such as invalid phone numbers or non-numeric age
entries. Additionally, the system should be capable of handling simultaneous user
interactions without data loss or corruption, ensuring a reliable and effective
management tool for maintaining up-to-date alumni records, thereby fostering
enhanced communication and engagement within the alumni community.

4
TABLE OF CONTENTS

Chapter Chapter Name Page No


No

1. Problem understanding, Identification of Entity and 6


Relationships, Construction of DB using ER Model for the
project
2. Design of Relational Schemas, Creation of Database Tables 7-10
for the project.
3. Complex queries based on the concepts of constraints, sets, 11-14
joins, views, Triggers and Cursors.
4. Analyzing the pitfalls, identifying the dependencies, and 15-17
applying normalizations
5. Implementation of concurrency control and recovery 18-19
mechanisms
6. Code for the project 20-29

7. Result and Discussion (Screen shots of the implementation 30-31


with front end.
8. Attach the Real Time project certificate / Online course 32-33
certificate

5
CHAPTER 1

Problem understanding, Identification of Entity and Relationships,

Construction of DB using ER Model for the project

An Alumni Information System (AIS) acts as a centralized platform for

maintaining connections with former students. It enables alumni to update their

contact details and engagement preferences while allowing institutions to

organize events, share updates, and facilitate networking opportunities. AIS

strengthens alumni relationships, provides resources for current students, and

contributes to institutional success.

ER DIAGRAM:

6
CHAPTER 2

Design of Relational Schema, Creation of Database Tables for

the project.

Relational Schema:

 Login (Login_ID, Login_username, Login_password)

 USER (USER_ID, USER_NAME, USER_EMAIL, USER_MOBILE,

USER_ADDRESS)

 Roles (Role_id, Role_Name, Role_desc)

 Permission (PER_ID, PER_NAME, PER_MODULES)

 Alumni (ALU_ID, ALU_DESC, ALU_TYPE)

 Student (STU_ID, STU_NAME, STU_EMAIL, STU_MOBILE)

 College (CO_ID, CO_NAME, CO_DESC)

7
Database Tables:

8
DDL AND DML STATEMENTS

9
10
CHAPTER 3

Complex queries based on the concepts of constraints, sets,

joins, views, Triggers and Cursors.

11
12
TCL COMMANDS:

13
FUNCTIONS:

14
CHAPTER 4

Analyzing the pitfalls, identifying the dependencies, and

applying Normalization

NORMALIZATION:
Functional Dependencies:-
In relational databases, a functional dependency (FD) is a fundamental concept that describes
a relationship between attributes (columns) in a table. It essentially defines how one attribute
determines the value of another attribute.
Normalization Forms:
● 1NF: No repeating groups, atomic values, unique identifiers (primary key).
● 2NF: Meets 1NF, eliminates partial dependencies (all non-key attributes depend on the
entire primary key).
● 3NF: Meets 2NF, eliminates transitive dependencies (no non-key attribute depends on
another non-key attribute).
● 4NF: Addresses multivalued dependencies (handles multiple related data sets).
● 5NF: Eliminates projector dependency (a specific type of redundancy)
Normalization of Our Tables:-

15
16
Here, We have introduced a new foreign key ALU_ID in the Student table to reference the alumni to which the
student belongs. This normalization ensures that the Student table is not indirectly dependent on the Alumni table.

17
CHAPTER 5

Implementation of concurrency control and recovery mechanisms


SQL Data Manipulation Language Commands, SQL Data Control Language Commands and
Transaction control commands

18
19
CHAPTER 6
Code for the project
from tkinter import messagebox, Tk, Toplevel, StringVar, Radiobutton, Entry, Label, Button, Scrollbar, ttk

def login():
username = username_Var.get()
password = password_Var.get()

if username == "kshitij" and password == "kshitij123":


login_window.destroy()

root.deiconify()

else:
messagebox.showerror("Login Failed", "Invalid username or password")

def open_login_window():
global login_window
root.withdraw()
login_window = Toplevel()
login_window.title("Login")
login_window.geometry("500x300")
login_window.config(bg="lightblue")

Label(login_window, text="Username:", bg="lightblue").pack(pady=10)


Entry(login_window, textvariable=username_Var, bg="lightgray").pack(pady=10)
Label(login_window, text="Password:", bg="lightblue").pack(pady=10)
Entry(login_window, textvariable=password_Var, show="*", bg="lightgray").pack(pady=10)
Button(login_window, text="Login", command=login, bg="green", fg="white").pack(pady=15)

import tkinter
import tkinter.ttk as ttk
from tkinter import *
import sqlite3
from tkinter import messagebox

root = Tk()
root.title("AlumniConnect")
root.geometry("780x400+0+0")
root.config(bg="Pink")

f_name = StringVar()
m_name = StringVar()
20
l_name = StringVar()
age = StringVar()
home_address = StringVar()
gender = StringVar()
phone_number = StringVar()

def Reset():
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")

def search():
search_query = search_var.get().lower()

tree.delete(*tree.get_children())

connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()

query = "SELECT * FROM `contactinformation` WHERE LOWER(`first_name`) LIKE ? OR


LOWER(`middle_name`) LIKE ? OR LOWER(`last_name`) LIKE ? OR LOWER(`home_address`) LIKE ?
OR LOWER(`phone_number`) LIKE ?"
cursor.execute(query, ('%' + search_query + '%', '%' + search_query + '%', '%' + search_query + '%', '%' +
search_query + '%', '%' + search_query + '%'))

fetchinfo = cursor.fetchall()

for data in fetchinfo:


tree.insert('', 'end', values=(data))

cursor.close()
connectn.close()

root.deiconify() # Show the main page after updating the tree with search results

# For creating the database and the table


# For creating the database and the table
def Database():
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()
cursor.execute(
"CREATE TABLE IF NOT EXISTS `contactinformation` (id INTEGER NOT NULL PRIMARY KEY
AUTOINCREMENT, first_name TEXT, middle_name TEXT, last_name TEXT, gender TEXT, age TEXT,
home_address TEXT, phone_number TEXT)")
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()
for data in fetchinfo:
21
tree.insert('', 'end', values=(data))
cursor.close()
connectn.close()

# Function for exiting the system


def Exit():
O = tkinter.messagebox.askyesno("Alumni", "Do you want to exit the system")
if O > 0:
root.destroy()
return

# Insert query for inserting the value in database Table


def Submit():
# Validate age input
age_value = age.get()
if not age_value.isdigit() or int(age_value) <= 0:
messagebox.showwarning('Invalid Age', 'Please enter a valid positive numeric age', icon="warning")
return

if (
f_name.get() == "" or
m_name.get() == "" or
l_name.get() == "" or
gender.get() == "" or
home_address.get() == "" or
phone_number.get() == ""
):
messagebox.showwarning('Incomplete Fields', 'Please complete all the fields', icon="warning")
return

tree.delete(*tree.get_children())
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()

cursor.execute(
"INSERT INTO `contactinformation` (first_name, middle_name, last_name, gender, age, home_address,
phone_number ) VALUES(?, ?, ?, ?, ?, ?, ?)",
(str(f_name.get()), str(m_name.get()), str(l_name.get()), str(gender.get()), int(age.get()),
str(home_address.get()),
int(phone_number.get())))

connectn.commit()
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()

for data in fetchinfo:


tree.insert('', 'end', values=(data))
cursor.close()
connectn.close()
f_name.set("")
22
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")

# Update Query for updating the table in the database


def Update():
if gender.get() == "":
msgg = tkinter.messagebox.showwarning('', 'Please Complete The Required Field', icon="warning")
else:
tree.delete(*tree.get_children())
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()
cursor.execute(
"UPDATE `contactinformation` SET `first_name` = ?, `middle_name` = ? , `last_name` = ?, `gender`
=?, `age` = ?, `home_address` = ?, `phone_number` = ? WHERE `id` = ?",
(str(f_name.get()), str(m_name.get()), str(l_name.get()), str(gender.get()), int(age.get()),
str(home_address.get()),
str(phone_number.get()), int(id)))
connectn.commit()
cursor.execute("SELECT * FROM `contactinformation` ORDER BY `last_name` ASC")
fetchinfo = cursor.fetchall()
for data in fetchinfo:
tree.insert('', 'end', values=(data))
gender1 = gender.get()
if not gender1:
tkinter.messagebox.showerror("Please select the gender")
cursor.close()
connectn.close()
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")

# Module for the update contact form window


def UpdateContact(event):
global id, UpdateWindow
curItem = tree.focus()
contents = (tree.item(curItem))
item = contents['values']
id = item[0]
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
23
age.set("")
home_address.set("")
phone_number.set("")

f_name.set(item[1])
m_name.set(item[2])
l_name.set(item[3])

age.set(item[5])
home_address.set(item[6])
phone_number.set(item[7])

UpdateWindow = Toplevel()
UpdateWindow.title("Contact Information")
UpdateWindow.geometry("500x520+0+0")
UpdateWindow.resizable(0, 0)
if 'Opennewwindow' in globals():
'Opennewwindow'.destroy()

# FRAMES
# module is for the frame, labels, text entry, and button for update contact form window
FormTitle = Frame(UpdateWindow)
FormTitle.pack(side=TOP)
ContactForm = Frame(UpdateWindow)
ContactForm.pack(side=TOP, pady=10)
RadioGroup = Frame(ContactForm)
Male = Radiobutton(RadioGroup, text="Male", variable=gender, value="Male", font=('arial',
14)).pack(side=LEFT)
Female = Radiobutton(RadioGroup, text="Female", variable=gender, value="Female", font=('arial',
14)).pack(side=LEFT)

# LABELS
label_title = Label(FormTitle, text="Update the Alumni Information", font=('Arial', 17), bg="light green",
width=400)
label_title.pack(fill=X)
label_FirstName = Label(ContactForm, text="First Name", font=('Calibri', 14), bd=5)
label_FirstName.grid(row=0, sticky=W)

label_MiddleName = Label(ContactForm, text="Last Name", font=('Calibri', 14), bd=5)


label_MiddleName.grid(row=1, sticky=W)

label_LastName = Label(ContactForm, text="Grad Year", font=('Calibri', 14), bd=5)


label_LastName.grid(row=2, sticky=W)

label_Gender = Label(ContactForm, text="Gender", font=('Calibri', 14), bd=5)


label_Gender.grid(row=3, sticky=W)

label_Age = Label(ContactForm, text="Age", font=('Calibri', 14), bd=5)


label_Age.grid(row=4, sticky=W)

label_HomeAddress = Label(ContactForm, text=" Comapany", font=('Calibri', 14), bd=5)


label_HomeAddress.grid(row=5, sticky=W)
24
label_PhoneNumber = Label(ContactForm, text="Phone Number", font=('Calibri', 14), bd=5)
label_PhoneNumber.grid(row=6, sticky=W)

# TEXT ENTRY
FirstName = Entry(ContactForm, textvariable=f_name, font=('Calibri', 14, 'bold'), bd=2, width=20,
justify='left')
FirstName.grid(row=0, column=1)

MiddleName = Entry(ContactForm, textvariable=m_name, font=('Calibri', 14, 'bold'), bd=2, width=20,


justify='left')
MiddleName.grid(row=1, column=1)

LastName = Entry(ContactForm, textvariable=l_name, font=('Calibri', 14, 'bold'), bd=2, width=20,


justify='left')
LastName.grid(row=2, column=1)

RadioGroup.grid(row=3, column=1)

Age = Entry(ContactForm, textvariable=age, font=('Calibri', 14, 'bold'), bd=2, width=20, justify='left')


Age.grid(row=4, column=1)

HomeAddress = Entry(ContactForm, textvariable=home_address, font=('Calibri', 14, 'bold'), bd=2,


width=20,
justify='left')
HomeAddress.grid(row=5, column=1)

PhoneNumber = Entry(ContactForm, textvariable=phone_number, font=('Calibri', 14, 'bold'), bd=2,


width=20,
justify='left')
PhoneNumber.grid(row=6, column=1)

# Buttons
ButtonUpdatContact = Button(ContactForm, text='Update', bd=2, font=('Calibri', 14, 'bold'), fg="black",
bg="lightgreen", command=Update)
ButtonUpdatContact.grid(row=8, columnspan=2, pady=10)

# Delete query for deleting the value


def Delete():
if not tree.selection():
msgg = tkinter.messagebox.showwarning('', 'Please Select the data!', icon="warning")
else:
msgg = tkinter.messagebox.askquestion('', 'Are You Sure You Want To Delete', icon="warning")
if msgg == 'yes':
curItem = tree.focus()
contents = (tree.item(curItem))
item = contents['values']
tree.delete(curItem)
connectn = sqlite3.connect("contactdata.db")
cursor = connectn.cursor()
cursor.execute("DELETE FROM `contactinformation` WHERE `id` = %d" % item[0])
25
connectn.commit()
cursor.close()
connectn.close()

# For creating the frame, labels, text entry, and button for add new contact form window
def MyNewContact():
global opennewwindow
f_name.set("")
m_name.set("")
l_name.set("")
gender.set("")
age.set("")
home_address.set("")
phone_number.set("")

Opennewwindow = Toplevel()
Opennewwindow.title("Contact Details")
Opennewwindow.resizable(0, 0)
Opennewwindow.geometry("500x500+0+0")
if 'UpdateWindow' in globals():
UpdateWindow.destroy()

#############Frames####################
FormTitle = Frame(Opennewwindow)
FormTitle.pack(side=TOP)
ContactForm = Frame(Opennewwindow)
ContactForm.pack(side=TOP, pady=10)
RadioGroup = Frame(ContactForm)
Male = Radiobutton(RadioGroup, text="Male", variable=gender, value="Male", font=('Calibri',
14)).pack(side=LEFT)
Female = Radiobutton(RadioGroup, text="Female", variable=gender, value="Female", font=('Calibri',
14)).pack(
side=LEFT)
# ===================LABELS==============================
label_title = Label(FormTitle, text="Adding New Contacts", bd=12, fg="black", bg="Lightgreen",
font=("Calibri", 15, "bold"), pady=2)
label_title.pack(fill=X)
label_FirstName = Label(ContactForm, text="First Name", font=('Calibri', 14), bd=5)
label_FirstName.grid(row=0, sticky=W)

label_MiddleName = Label(ContactForm, text="Last Name", font=('Calibri', 14), bd=5)


label_MiddleName.grid(row=1, sticky=W)

label_LastName = Label(ContactForm, text="Grad Year", font=('Calibri', 14), bd=5)


label_LastName.grid(row=2, sticky=W)

label_Gender = Label(ContactForm, text="Gender", font=('Calibri', 14), bd=5)


label_Gender.grid(row=3, sticky=W)

label_Age = Label(ContactForm, text="Age", font=('Calibri', 14), bd=5)


label_Age.grid(row=4, sticky=W)
26
label_HomeAddress = Label(ContactForm, text="Company", font=('Calibri', 14), bd=5)
label_HomeAddress.grid(row=5, sticky=W)

label_PhoneNumber = Label(ContactForm, text="Phone Number", font=('Calibri', 14), bd=5)


label_PhoneNumber.grid(row=6, sticky=W)

# ===================ENTRY===============================
FirstName = Entry(ContactForm, textvariable=f_name, font=('Calibri', 14, 'bold'), bd=3, width=20,
justify='left')
FirstName.grid(row=0, column=1)

MiddleName = Entry(ContactForm, textvariable=m_name, font=('Calibri', 14, 'bold'), bd=3, width=20,


justify='left')
MiddleName.grid(row=1, column=1)

LastName = Entry(ContactForm, textvariable=l_name, font=('Calibri', 14, 'bold'), bd=3, width=20,


justify='left')
LastName.grid(row=2, column=1)

RadioGroup.grid(row=3, column=1)

Age = Entry(ContactForm, textvariable=age, font=('Calibri', 14, 'bold'), bd=3, width=20, justify='left')


Age.grid(row=4, column=1)

HomeAddress = Entry(ContactForm, textvariable=home_address, font=('Calibri', 14, 'bold'), bd=3,


width=20,
justify='left')
HomeAddress.grid(row=5, column=1)

PhoneNumber = Entry(ContactForm, textvariable=phone_number, font=('Calibri', 14, 'bold'), bd=3,


width=20,
justify='left')
PhoneNumber.grid(row=6, column=1)

# ==================BUTTONS==============================
ButtonAddContact = Button(ContactForm, text='Please Save', bd=5, font=('Calibri', 12, 'bold'), fg="black",
bg="lightgreen", command=Submit)
ButtonAddContact.grid(row=7, columnspan=2, pady=10)

# module for whole frame window, labels and button of contact management system
# ============================FRAMES======================================
Top = Frame(root, width=600, bd=1)
Top.pack(side=TOP)
M = Frame(root, width=650, bg="pink")
M.pack(side=BOTTOM)
F = Frame(width=7, height=8, bd=10, bg="pink")
F.pack(side=BOTTOM)
MR = Frame(M, width=100) # Right Middle frame
MR.pack(side=RIGHT, pady=10)
TableMargin = Frame(root, width=500)
27
TableMargin.pack(side=TOP)

# LABELS
label_title = Label(Top, text="AlumniConnect", bd=7, relief=GROOVE, fg="Black", bg="lightgreen",
font=("Calibri", 25, "bold"), pady=3)
label_title.pack(fill=X)

# BUTTONS
Add_Button = Button(F, text='Add New Alumni', font=('Calibri', 17, 'bold'), fg="black",
bg="lightgreen", command=MyNewContact).grid(row=0, column=0, ipadx=20, padx=30)

Delete_Button = Button(F, text='Delete The Alumni', font=('Calibri', 17, 'bold'), command=Delete,


fg="black", bg="lightgreen").grid(row=0, column=1, ipadx=20)

Exit_Button = Button(F, text='Exit System', font=('Calibri', 17, 'bold'), command=Exit,


fg="black", bg="lightgreen").grid(row=0, column=2, ipadx=20, padx=30)

# creating a tables in contact management system


scrollbarx = Scrollbar(TableMargin, orient=HORIZONTAL)
scrollbary = Scrollbar(TableMargin, orient=VERTICAL)
tree = ttk.Treeview(TableMargin,
columns=("Id", "First Name", "Last Name", "Grad Year", "Gender", "Age", "Company", "Phone
Number"),
height=400, selectmode="extended", yscrollcommand=scrollbary.set,
xscrollcommand=scrollbarx.set)
scrollbary.config(command=tree.yview)
scrollbary.pack(side=RIGHT, fill=Y)
scrollbarx.config(command=tree.xview)
scrollbarx.pack(side=BOTTOM, fill=X)

tree.heading('Id', text="Id", anchor=W)


tree.heading('First Name', text="First Name", anchor=W)
tree.heading('Last Name', text="Last Name", anchor=W)
tree.heading('Grad Year', text="Grad Year", anchor=W)
tree.heading('Gender', text="Gender", anchor=W)
tree.heading('Age', text="Age", anchor=W)
tree.heading('Company', text="Company", anchor=W)
tree.heading('Phone Number', text="phone Number", anchor=W)

search_var = StringVar()
search_entry = Entry(F, textvariable=search_var, font=('Calibri', 17, 'bold'), bd=3, width=20, justify='left')
search_entry.grid(row=0, column=3, padx=20)
search_button = Button(F, text='Search', font=('Calibri', 17, 'bold'), command=search, fg="black",
bg="lightgreen")
search_button.grid(row=0, column=4, ipadx=20, padx=30)

tree.column('#0', stretch=NO, minwidth=0, width=0)


tree.column('#1', stretch=NO, minwidth=0, width=0)
tree.column('#2', stretch=NO, minwidth=0, width=80)
tree.column('#3', stretch=NO, minwidth=0, width=120)
tree.column('#4', stretch=NO, minwidth=0, width=90)
tree.column('#5', stretch=NO, minwidth=0, width=80)
28
tree.column('#6', stretch=NO, minwidth=0, width=30)
tree.column('#7', stretch=NO, minwidth=0, width=120)

tree.pack()
tree.bind('<Double-Button-1>', UpdateContact)

# ============================INITIALIZATION==============================
if __name__ == '__main__':
Database()
username_Var = StringVar()
password_Var = StringVar()
open_login_window()
root.mainloop()

29
CHAPTER 7

Result and Discussion

LOGIN PAGE

FRONT-END

30
FUNCTIONS

DATABASE DESIGN

31
CHAPTER 8

Online course certificates

Ashmit Shandilya [Reg No:RA2211030010160]

32
Satvik [Reg No:RA2211030010176]

33
Dikshant [Reg No:RA2211030010177]

34

You might also like