VELAMMAL VIDHYASHRAM
SURAPET
COMPUTER SCIENCE
COMPANIES MANAGEMENT SYSTEM
ACADEMIC YEAR : 2024-2025
NAME : V.G DARSHAN
CLASS : 12A
ROLL NUMBER :
BONAFIDE CERTIFICATE
This is to certify that this COMPUTER SCIENCE Project on the
topic“ Companies Management System” has been Successfully
completed by V.G DARSHAN of class XII–A,Roll. No: at
Velammal Vidhyashram, Surapet, for the partial fulfillment of this
project as a part of Senior Secondary Certificate Examination –
CBSE, New Delhi for the academic Year 2024- 2025.
Date :
Signature of Principal Teacher in-charge
Signature of the Internal Examiner Signature of the External Examiner
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends
largely on the encouragement and guidelines of many others. I take
this opportunity to express my gratitude to the people who have been
instrumental in the successful completion of this project.
I express deep sense of gratitude to almighty God for giving me
strength for the successful completion of the project.
I express my heartfelt gratitude to my parents and siblings for constant
encouragement while carrying out this project.
I gratefully acknowledge the contribution of the individuals who
contributed in bringing this project up to this level, who continues to
look after me despite my flaws.
I express my deep sense of gratitude to the luminary The Principal,
Velammal Vidhyashram, Surapet who has been continuously
motivating and extending their helping hand to us.
My sincere thanks to Mrs. Deivanai, CS Teacher, A guide, Mentor all
the above a friend, who critically reviewed my project and helped in
solving each and every problem, occurred during implementation of
the project
The guidance and support received from all the members who
contributed and who are contributing to this project, was vital for the
success of the project. I am grateful for their constant support and
help.
TABLE OF CONTENT
1.ABSTRACT
2.SYSTEMCONFIGURATION
3.INTRODUCTION
4.OBJECTIVES OF THEPROJECT
5.PROPOSED SYSTEM
6.BRARIES AND FUNCTIONS USED
7.MYSQL QUERIES USED IN THIS PROJECT
8.SOURCECODE
9.OUTPUT
10.CONCLUSION
11.BIBILOGRAPHY
ABSTRACT
The "Companies Management System" is a comprehensive software
solution designed to manage, track, and display information about the
top companies across various industries. This system integrates
Python with SQL to provide a user-friendly interface for managing key
business data, such as company names, revenue, profit, industry, and
location. By utilizing a relational database management system
(RDBMS), specifically MySQL, the project demonstrates the effective
use of SQL queries for storing, updating, retrieving, and deleting
company data.
The primary objective of this project is to build an interactive
application that can efficiently handle data of the top companies based
on specific criteria, like revenue, and allow users to perform essential
operations such as adding new companies, updating existing
information, and deleting obsolete records. The system ranks
companies by their revenue and allows easy retrieval of the top
performers, making it suitable for business analysts or anyone
interested in industry benchmarking.
The Python backend connects to an SQL database, where data is
securely stored and retrieved using SQL queries. The application
features a simple menu-driven interface, allowing users to interact
with the system and perform CRUD (Create, Read, Update, Delete)
operations. Additionally, it uses SQL to filter, sort, and query the
database, ensuring quick access to the most relevant data.
In summary, the project provides a practical example of database
management and Python programming in a real-world business
scenario. It helps users understand the power of combining Python and
SQL for managing large datasets and automating business processes,
making it an ideal tool for understanding database management
systems and their applications in business analytics.
SYSTEM REQUIREMENTS
HARDWARE CONFIGURATION
Microsoft windows 7 professional/windows 8/windows 8.2:
1. Processor : Intel Core i3 or equivalent
2. Memory : 2 GB (32-bit), 4 GB (64-bit)
3. Disk space: 1.5 GB of free disk space
SOFTWARE REQUIREMENTS
➢ 1 GB RAM (2 GB+recommended)
➢ 9-58 GB free hard disk space depending on edition and
configuration, including space required for temporary files
➢ DVD-ROM drive (if installing from a Media Kit DVD)
➢ Basic GPU – Any vendor DirectX 9.0 class or better
(Pixel Shader Level2)
➢ Intel® Pentium® or compatible, 1.6 GHz minimum (2GHz
+recommended)
➢ 1024x768 or higher-resolution monitor
➢ Mouse or other pointing devices
INTRODUCTION
In today's rapidly evolving business environment, managin
and analyzing data efficiently is crucial for making informed
decisions. Large corporations and organizations rely heavily
on data to track their performance, analyze trends, and
make strategic decisions. The "Companies Management
System" is an innovative project designed to help users
manage key data about leading companies from various
industries. By leveraging the power of Python and SQL, this
system provides a structured and user-friendly platform to
store, manage, and analyze information on the top 50
companies based on their financial performance.
The primary focus of this project is to develop a Python-
based application that interfaces with a relational database
(MySQL) to store important information about companies
such as their names, industry,revenue, profit, and location.
The system ranks companies based on their revenue,
allowing users to easily identify the top performers across
various industries. Additionally, users can perform basic
CRUD (Create,Read,Update, Delete) operations to manage
company data and keep it up to date.This is done with SQL
queries that interact with the back end database, ensuring
secure and efficient data storage and retrieval.
The project not only demonstrates the ability to work with
Python and SQL but also highlights the practical applications of
database management systems (DBMS) in real-world business
scenarios. SQL provides the necessary tools to filter, sort, and
query large datasets, while Python's simplicity and versatility
make it an ideal programming language for building
interactive,user-friendly applications.
This system is particularly useful for businesses, analysts, and
researchers who need to track the financial performance and
rankings of leading companies globally. By using this tool, users
can gain valuable insights into which companies are leading in
terms of revenue and profit, enabling them make more
informed decisions regarding investments, market trends,
and industry analysis.
Overall, the "Companies Management System" combines the
strengths of Python and SQL to create an efficient, scalable, and
easy-to-use platform for managing and analyzing corporate data.
Through its development, this project not only showcases the
power of programming and databases but also emphasizes the
importance of data-driven decision making in modern business
practices. 
OBJECTIVE OF THE PROJECT
The main objective of the "Companies Management
System" project is to design and develop an efficient and
interactive system that enables the management, storage,
and analysis of key information about the top 50 companies
globally. This system aims to provide users with a user-
friendly interface to perform essential operations such as
adding, updating, deleting, and retrieving company data.
The project seeks to demonstrate the effective integration
of Python and SQL to manage large datasets and provide
insightful analysis for decision-making.
Key objectives of the project are:
1.Database Management:
❖ To create and manage a relational database using SQL
that stores important details of companies, such as name,
industry, revenue, profit, and location.
❖ To use SQL queries to retrieve, sort, and manipulate
company data efficiently, ensuring quick and accurate
results.
2.Data Retrieval and Display:
❖ To fetch and display information about the top 50
companies based on their revenue, providing a ranked list
of companies that helps users easily identify leading
businesses across various industries.
3.CRUD Operations:
❖ To implement Create, Read, Update, and Delete
operations that allow users to:
♦ Add new companies to the database.
♦ View existing company data, sorted by revenue or
other parameters.
♦ Update the details of a company, such as its
revenue or location.
♦ Delete companies that are no longer relevant.
4.Data Analysis and Sorting:
❖ To sort companies based on key performance metrics
(e.g., revenue or profit) and perform queries that help
analyze business trends and identify industry leaders.
5.User Interaction:
❖ To design a simple, intuitive, and interactive Python-based
menu system that allows users to interact with the
database and execute SQL queries through easy-to-
understand commands.
6.Real-World Application:
❖ To build a system that can be used in a real-world business
scenario to help analysts, business owners, and investors
track the performance of top companies in different sectors,
aiding in better decision-making.
7.Technical Skill Development:
❖ To develop skills in using Python for database interaction,
and gain experience in working with SQL databases, SQL
queries, and data management techniques.
By achieving these objectives, this project will demonstrate the
practical application of Python and SQL in handling large datasets and
will provide a useful tool for managing and analyzing the data of top-
performing companies.
PROPOSED SYSTEM
The proposed system is designed to manage, store, and analyze data
related to the Companies across various industries. This system will
use a relational database management system (RDBMS), specifically
MySQL, to store and retrieve company data, and Python to interface
with the database. The system will provide an intuitive user interface
to perform CRUD operations and will allow users to access the top-
performing companies based on specific metrics like revenue.
Objectives of the Proposed System
1. Efficient Data Management: The proposed system will allow
users to manage data about companies and their
management systems easily, performing basic operations like
adding, updating, deleting, and viewing records.
2. Database Integration: By integrating SQL with Python, this
system will provide a backend for storing data, ensuring data
consistency and enabling complex querying.
3. User-Friendly Interface: The system will include a simple
menu-driven or graphical interface for easy navigation and
interaction.
System Design and Features
1. Data Structure and Database Design
a. Database: SQL (SQLite or MySQL)
b. Tables:
i. Companies: Stores details like company name,
industry, and location.
ii. Management Systems: Stores details of each
company's management systems, such as system
name, type, and features.
c. Relationships: Each company can have multiple
management systems, linked by a foreign key relationship.
2. System Modules and Functions
a. Add Company: Allows users to input and store new
company data.
b. Add Management System: Enables users to add
information about management systems associated with
companies.
c. View Companies: Displays a list of all companies, including
their details and associated management systems.
d. Search Company: A function to search for companies by
name, making it easier to find specific records.
e. Update Company Details: Allows modification of existing
company records.
f. Delete Company: Provides a way to remove companies and
their associated management systems from the database.
LIBRARIES AND FUNCTIONS USED
Database Connection:
➢ connect_db(): Establishes a connection to the SQL
database. This function uses the MySQL. Connector or
sqlite3 library to connect Python with the database,
allowing for data storage and retrieval.
➢ close_connection(db, cursor): Closes the database
connection once all operations are complete. This
function ensures that the cursor (which executes SQL
commands) and the connection to the database are
properly closed to prevent any open connection issues.
CRUD Operations (Create, Read, Update, Delete):
➢ add_company(cursor, name, industry, location): Adds a
new company record to the database with the given
company name, industry, and location details. This
function inserts a new row into the companies table
and assigns a unique company_id.
➢ add_management_system(cursor, company_id,
system_name, system_type, features): Adds
information about a management system linked to a
specific company. This function stores details about the
system, such as its name, type, and features, and
associates it with the relevant company_id.
➢ view_companies(cursor): Retrieves and displays all
companies in the database. This function fetches all
records from the companies table and displays the list
of companies along with their details.
➢ search_company(cursor, name): Searches the
companies table for a specific company by name. This
function uses a SQL LIKE query to find and return
matching company records, making it easier for users
to locate specific companies.
➢ update_company(cursor, company_id, name, industry,
location): Updates an existing company’s details based
on the company_id. This function modifies the
company’s name, industry, or location if there are
changes to be made.
➢ delete_company(cursor, company_id): Deletes a
company record based on the company_id. This
function removes a company and any associated data,
which is useful for cleaning up outdated records.
Transaction Management:
➢ commit_changes(db): Commits all changes made to the
database during the session. This function is essential
for saving any new, updated, or deleted records
permanently in the database.
Exception Handling:
➢ safe_execute(query, values): Executes a database
query within a try except block to catch any SQL-related
errors (like connection issues or invalid SQL syntax). This
function ensures that the system can handle errors
gracefully, providing error messages if something goes
wrong.
SOURCE CODE
import mysql.connector
db = mysql.connector.connect(
host="localhost",
user="root",
password="amuth@2007",
database="company_management")
cursor = db.cursor()
def add_company(name, industry, location):
query = "INSERT INTO companies (name, industry, location) VALUES (%s, %s, %s)"
values = (name, industry, location)
cursor.execute(query, values)
db.commit()
print("Company added successfully.")
def add_management_system(company_id, system_name, system_type, features):
query = "INSERT INTO management_systems (company_id, system_name, system_type, features)
VALUES (%s, %s, %s, %s)"
values = (company_id, system_name, system_type, features)
cursor.execute(query, values)
db.commit()
print("Management System added successfully.")
def view_companies():
query = "SELECT * FROM companies"
cursor.execute(query)
for (company_id, name, industry, location) in cursor.fetchall():
print(f"ID: {company_id}, Name: {name}, Industry: {industry}, Location: {location}")
def search_company(name):
query = "SELECT * FROM companies WHERE name LIKE %s"
cursor.execute(query, (f"%{name}%",))
result = cursor.fetchall()
if result:
for row in result:
print(row)
else:
print("No company found with that name.")
def update_company(company_id, name=None, industry=None, location=None):
query = "UPDATE companies SET name = %s, industry = %s, location = %s WHERE company_id = %s"
cursor.execute(query, (name, industry, location, company_id))
db.commit()
print("Company updated successfully.")
def delete_company(company_id):
query = "DELETE FROM companies WHERE company_id = %s"
cursor.execute(query, (company_id,))
db.commit()
print("Company deleted successfully.")
def main():
while True:
print("===================================")
print("1. Add a Company")
print("2. Add a Management System")
print("3. View Companies")
print("4. Search Company by Name")
print("5. Update a Company")
print("6. Delete a Company")
print("7. Exit")
print("===================================")
choice = input("Enter your choice: ")
print("===================================")
if choice == '1':
name = input("Enter company name: ")
industry = input("Enter industry: ")
location = input("Enter location: ")
add_company(name, industry, location)
elif choice == '2':
company_id = int(input("Enter company ID: "))
system_name = input("Enter system name: ")
system_type = input("Enter system type (e.g., ERP, CRM): ")
features = input("Enter features: ")
add_management_system(company_id, system_name, system_type, features)
elif choice == '3':
view_companies()
elif choice == '4':
name = input("Enter company name to search: ")
search_company(name)
elif choice == '5':
company_id = int(input("Enter company ID to update: "))
name = input("Enter new company name: ")
industry = input("Enter new industry: ")
location = input("Enter new location: ")
update_company(company_id, name, industry, location)
elif choice == '6':
company_id = int(input("Enter company ID to delete: "))
delete_company(company_id)
elif choice == '7':
print("Exiting program.")
break
else:
print("Invalid choice, please try again.")
print("===================================")
main()
cursor.close()
db.close()
OUTPUT
FIRST OPTION OUTPUT
SECOND OPTION OUTPUT
THIRD OPTION OUTPUT
FOURTH OPTION OUTPUT
FIFTH OPTION OUTPUT
SIXTH OPTION OUTPUT
===================================
1. Add a Company
2. Add a Management System
3. View Companies
4. Search Company by Name
5. Update a Company
6. Delete a Company
7. Exit
===================================
Enter your choice: 6
===================================
Enter company ID to delete:11
Company deleted successfully.
===================================
SEVENTH OPTION OUTPUT
SQL TABLE STRUCTURE
SQL TABLE COMPANIES
SQL TABLE MANAGEMENT SYSTEM
CONCLUSION
The Company Management System is a comprehensive solution
designed to streamline and automate the management of various
aspects of companies, such as company details, management
systems, and associated functionalities. This system leverages a
database to efficiently store and retrieve company data, while Python
and SQL work in tandem to manage data operations like insertion,
deletion, and updates.
Key Features Achieved:
1. Database Design: A relational database was created with tables
to store information about companies (companies table) and
their respective management systems (management_systems
table). This ensures structured data storage and supports
complex queries for efficient data retrieval.
2. Add and Delete Operations: The system provides functionalities
to:
a. Add a company to the database with relevant details like
name, industry, and location.
b. Add management systems for each company, specifying
the system's name, type, and features.
c. Delete a company from the database by providing the
company’s unique ID, which also ensures the management
systems related to that company are removed, maintaining
data integrity.
3. Python and SQL Integration: Using Python as the backend
programming language and MySQL for database management,
the project demonstrates a seamless interaction between the
two technologies. SQL queries, such as INSERT INTO, DELETE,
and SELECT, are executed through Python scripts to interact
with the database and manipulate the data.
4. Improved Data Management: The project helps in centralizing
and managing information for multiple companies and their
respective management systems. This would be beneficial for
businesses seeking to organize and keep track of different
management tools they are using.
5. Scalability: The system can easily be extended to include
additional features like updating company records, retrieving
detailed reports on management systems, and incorporating
more sophisticated user authentication and role-based access
control for better security.
Overall Outcome:
This project successfully fulfills the requirements of managing
company information and their management systems in an organized
and efficient manner. It introduces essential concepts in database
design, SQL operations, and Python database interaction, providing a
solid foundation for further enhancement or integration with more
complex enterprise systems.
Future Enhancements:
• User Interface (UI): Implementing a graphical user interface
(GUI) using libraries like Tkinter or web-based frameworks like
Flask/Django to make the system user-friendly.
• Advanced Features: Integration of features like report
generation, multi-user support, and data analytics for deeper
insights into the management systems.
• Security: Incorporating security features like user
authentication, role-based access control, and encryption for
sensitive data.
In conclusion, the Company Management System project provides a
solid, scalable foundation for managing company-related data and
their management systems using Python and SQL. It showcases
practical knowledge of database management, programming, and
system design, making it a valuable tool for businesses or
organizations to maintain their operational records.
BIBLIOGRAPHY
❑SUMITA ARORA Text Book
❑https://docs.python.org/
❑https://www.mysql.com/
❑https://pypi.org/project/mysql-connector-python/