0% found this document useful (0 votes)
38 views

Presentation1 Cs

This document describes a Python-based marriage bureau management system project. The project uses a MySQL database to store user registration information and profiles of people looking for marriage partners. The Python code includes functions for registering users, logging in, adding profiles, and searching profiles by criteria like profession or appearance. The code is organized into functions and interacts with the database using SQL queries. The document outlines the database structure, user interactions, and concludes that such a system can simplify processes and enhance the experience for users of marriage bureaus.

Uploaded by

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

Presentation1 Cs

This document describes a Python-based marriage bureau management system project. The project uses a MySQL database to store user registration information and profiles of people looking for marriage partners. The Python code includes functions for registering users, logging in, adding profiles, and searching profiles by criteria like profession or appearance. The code is organized into functions and interacts with the database using SQL queries. The document outlines the database structure, user interactions, and concludes that such a system can simplify processes and enhance the experience for users of marriage bureaus.

Uploaded by

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

COMPUTER SCIENCE PRACTICAL

PROJECT
THEME:- MARRIGE BUREAU
MANAGEMENT

SUBMITTED BY: SUBMITTED TO:


NAME: SOURABH SAHU Mrs. DIVYA SAHU
CLASS: 12TH A
ROLL NO: (P.G.T CS)
INDE
X
S.NO
TITLE
1 CERTIFICATE

2 DECLARATION

3 ACKNOWLEDGEMENT

4 OBJECTIVE

5 INTRODUCTION

6 CODE FOR PROJECT


7 OUTPUT
8 FUTURE SCOPE

9 CONCLUSION

10 BIBLIOGRAPHY
CERTIFICATE
This is to certify that SOURABH SAHU student of class XII A
(Sci.) has successfully prepared the report on the Project
entitled “MARRIGE BUREAU MANAGEMENT THEME
." under the guidance of Mrs. DIVYA SAHU (PGT C.S ). The
report is the result of his efforts & endeavors.
The report is found worthy of acceptance as final Project
report for the subject computer science of class XII (sci.).

Signature of Signature of
physics teacher External Examiner

Signature of
Principal
ACKNOWLEDGMENT

I would like to express my sincere gratitude to all those who


have contributed to the successful completion of my physics
project. This project,titled MARRIGE BUREAU
MANAGEMENT THEME , was undertaken as a part of
my academic curriculum in Class 12th A at Kendriya
Vidyalaya No. 1, Raipur.
First and foremost, I extend my heartfelt appreciation to my
physics teacher Mrs. DIVYA SAHU whose guidance and
support were invaluable throughout the
expertiseproject.
and dedication
Their provided me with the necessary
direction to undertake this endeavor.
Finally, I would like to acknowledge the extensive resources
available at Kendriya Vidyalaya No. 1, Raipur, including the
well-equipped laboratory, library, and access to relevant
materials, which greatly contributed to the successful
completion of this project.
Thank you all for your valuable assistance and support.

Class 12th A
DECLARATION

I hereby declare that the project work


entitled “MARRIGE BUREAU MANAGEMENT
THEME ”, submitted to Department of
C.S, Kendriya Vidyalaya No 1 Raipur is
prepared by me .

12TH A
MARRIGE BUREAU MANAGEMENT

File imported in python :


• Mysql ( for database
connectivity)

Functions used in project :


 Connect()
 Cursor()
 Fetchall()
 Fetchone()
 Commit()
1. Database Setup:
A database is like a structured Excel sheet that stores information. In this project, we
use MySQL, a popular database system.
We set up a database called “marriage_bureau_management” to store information
about users and customers looking for marriage partners.
User Registration and Login:
Users (people looking for marriage partners) can register with a username and
password. This information is stored in the “user_id” table.
Users can log in using their registered username and password. If they provide the
correct details, they can access the system.
Customer Details:
Users can add details about people who are looking for marriage partners. This
includes their name, address, caste, appearance, age, profession, and phone number.
This information is stored in the “customer_details” table.
Searching for Matches:
Users can search for potential matches based on two criteria: profession and
appearance.
If you’re looking for someone with a specific job (like a doctor or engineer), you can
search for matches by their profession.
If you’re looking for someone who looks a certain way (beautiful, handsome, etc.), you
can search for matches by their appearance.
The system will display matching profiles based on the criteria you provide.
Menu and Interaction:
The project provides a simple menu for users with options like registration, login,
adding customer details, and searching for matches.
Users can choose from these options and interact with the system.
Error Handling:
The project includes some basic error handling to check for duplicate user registrations
and provides feedback to the user.
Database Interaction:
The program interacts with the MySQL database using Python. It uses SQL queries to
store and retrieve data.
Structure:
The code is organized into functions, which makes it easier to understand and
maintain. Functions like “register_user” and “login_user” handle specific tasks.
Python code:

import mysql.connector as sql # Connect to the


MySQL database conn = sql.connect(host='localhost',
user='root', password='admin') c1 = conn.cursor()
c1.execute(" create database if not exists
marriage_bureau_management") c1.execute("use
marriage_bureau_management") def create_tables(): #
Create tables for customer details and user accounts
c1.execute(''' CREATE TABLE IF NOT EXISTS
user_id ( id INT AUTO_INCREMENT PRIMARY
KEY, user_name VARCHAR(255), password
VARCHAR(255) ) ''') c1.execute(''' CREATE TABLE
IF NOT EXISTS customer_details ( id INT
AUTO_INCREMENT PRIMARY KEY, name
VARCHAR(200), address VARCHAR(100), caste
VARCHAR(100), appearance VARCHAR(100), age
INT, profession VARCHAR(255), phone_no
BIGINT ) ''') conn.commit() def register_user(): name
= input('Enter your Username: ') passwd =
input('Enter your Password (only numbers): ') # Insert
user data into the 'user_id' table using a
parameterized query sql_insert = "INSERT INTO user_id (user_name,
password) VALUES (%s, %s)" user_data = (name, passwd) try:
c1.execute(sql_insert, user_data) conn.commit() print('User created
successfully') except sql.IntegrityError as e: print('User already exists.')
def login_user(): name = input('Enter your Username: ') passwd =
input('Enter your Password: ') # Select user data from the 'user_id' table
using a parameterized query sql_select = "SELECT * FROM user_id
WHERE user_name = %s AND password = %s" user_data = (name,
passwd) c1.execute(sql_select, user_data) result = c1.fetchone() if
result: print('Login successful') return result[0] # Return the user's ID
else: print('Invalid username or password') return None def
add_customer_details(): name = input('Enter the name: ') address =
input('Enter the address: ') caste = input('Enter the caste: ') appearance =
input('Enter the appearance: ') age = int(input('Enter the age: '))
profession = input('Enter the profession: ') phone_no = int(input('Enter
the phone number: ')) # Insert customer data into the 'customer_details'
table using a parameterized query sql_insert = "INSERT INTO
customer_details (name, address, caste, appearance, age, profession,
phone_no) VALUES (%s, %s, %s, %s, %s, %s, %s)" customer_data =
(name, address, caste, appearance, age, profession, phone_no) try:
c1.execute(sql_insert, customer_data) conn.commit() print('Customer
details added successfully') except Exception as e: print('Error:', e) def
search_matches_by_profession(profession): # Select customer data from
the 'customer_details' table based on the profession sql_select =
"SELECT * FROM customer_details WHERE profession = %s"
c1.execute(sql_select, (profession,)) results = c1.fetchall() if results:
print("Matching customers:") for result in results: print(result) else:
print('No matching customers found.') def
search_matches_by_appearance(appearance): # Select
customer data from the 'customer_details' table
based on appearance sql_select = "SELECT *
FROM customer_details WHERE appearance =
%s" c1.execute(sql_select, (appearance,)) results
= c1.fetchall() if results: print("Matching
customers:") for result in results: print(result)
else: print('No matching customers found.') def
main_menu():
print('**********************************
*******************MARRIAGE BUREAU
MANAGEMENT*************************
*************************') print('1.
Register') print('2. Login') print('3. Add
Customer Details') print('4. Search Matches by
Profession') print('5. Search Matches by
Appearance') print('6. Exit') while True: choice =
int(input('Enter your choice:')) if choice == 1:
register_user() elif choice == 2: user_id =
login_user() if user_id is not None: # You can
add more functionality for logged-in users here
pass elif choice == 3: add_customer_details() elif
choice == 4: profession = input('Enter the
profession to search: ')
search_matches_by_profession(profession) elif
choice == 5: appearance = input('Enter the
appearance to search: ')
search_matches_by_appearance(appearance) elif
choice == 6: print('Exiting the program') break
else: print('Invalid choice') if __name__ ==
'__main__': create_tables() main_menu()
Conclusion:

In conclusion, a well-designed marriage


bureau system is an invaluable tool for
mode . It not only simplifies administrative
processes but also enhances the overall
experience for marriages and users. By
embracing technology, this system
can better serve their communities and
foster a culture of lifelong learning and
knowledge dissemination.
Bibliography:

 www.slideshare.com
 www.python.mykvs.in
 Sumita arora class 12 python

You might also like