CS REALESTATE CRT
CS REALESTATE CRT
GUIDED BY:
Mrs.M.DHANALAKSHMI,M.E,B.Ed
GURU SHREE SHANTIVIJAI JAIN
VIDYALAYA(JUNIOR COLLEGE)
BONAFIDE CERTIFICATE
DATED TEACHER-IN-CHARGE
SEAL:
ACKNOWLEDGEMENT
I also thank our teaching, non-teaching staff and my friends who have helped
me a lot in doing this project.
B.J.KIRTHAN
CONTENTS
Overview of python
Overview of Mysql
System requirements
Introduction
Aim of the project
Source code
Sample output
Conclusion
Bibliography
OVERVIEW OF PYTHON LANGUAGE
Guido Van Rossum published the first version of Python code(version0.9.0) in February
1991. This release included already exception handling, functions, and the core data
types of list, dict ,str and others .It was also object oriented and had a module system.
Python version 1.0 was released in January 1994. The major new features included in
this release were the functional programming tools lambda,map,filter and reduce which
Guido Van Rossum never liked.
Six and a half years later in October 2000, Python 2.0 was introduced. This release
included list comprehensions,a full garbage collector and it was supporting unicode.
Python flourished for another 8 years in the versions 2x before the next major release as
Python3.0 as"Python3000"and"Py3K")was released.Python3 is not backwards
compatible with Python
2.x.The emphasis in Python3 had been on the removal of duplicate programming
constructs and modules.
• Uses an elegant syntax ,making the programs you write easier to read.
• The language supports raising and catching exceptions, resulting in cleaner error
handling.
Data are strongly and dynamically typed. Mixing incompatible types (e.g. attempting
to add a string and a number) causes an exception to be caught sooner.
SQL is one of the most demanding skill in the current world. Every day a huge
amount of data is collected and one have to deal with these databases to make an
strategies from a database and can easily interact with large and massive
database, no matter what is the size. These features of SQL make SQL a most
powerful tool. Hence, here are some of the major SQL features which makes it a
High Perfomance
heavy workload and high usage database system. SQL programming gives
High Avaialbility
MySQL, Oracle Database, SAP HANA, SAP Adaptive Server, etc. All of these
SQL provide Scalability and Flexibility. It is very easy to create new tables and
Open Source
management system . All these features of SQL makes it a robust and primary
HARDWARE
Minimum Maximum
CPU : 64bit x86 Multi core64bit x86
SOFTWARE REQUIREMENTS:
PythonIDLE(3.10)
MYSQL
Windows 7 or higher
INTRODUCTION
project designed to streamline and optimize the management of real estate properties,
and integrated with MySQL, this system aims to provide a robust platform for real estate
professionals, developers, and clients to effectively manage, monitor, and analyze various
aspects of the real estate development lifecycle. By harnessing the capabilities of Python
and MySQL, this Real Estate Management System aims to revolutionize the efficiency
and transparency of property management processes. This project endeavors to bridge the
gap between stakeholders, offering a sophisticated yet accessible platform that fosters
trust, reliability, and efficiency in the dynamic landscape of real estate operations.
The primary goal of this project is to create a user-friendly, secure, and efficient system
that automates and centralizes the management of real estate development operations. It
The aim of the project is to make a program which can help the employee to display,
add, delete , search and update an specific property which is available for purchase
by the clients in the database.
DISPLAY PROPERTIES :
SEARCH PROPERTY:
This feature can be used to search about the property and it’s details using the ID of
the property .
DELETER PROPERTY:
This feature enables to delete the property using the property ID.
This feature can be used to add a new property with all of its details in the
existing database.
UPDATE PROPERTY:
This feature helps to update the price of the property in case of resale.
SOURCE CODE
MYSQL
CREATING DATABASE
import mysql.connector
mydb = mysql.connector.connect(
host="localhost",
user="root",
password="kirthan",
database="KSBNrealestate"
)
mc = mydb.cursor()
mc.execute("""
CREATE TABLE Property_details (
property_id INT PRIMARY KEY,
property_type VARCHAR(15),
area VARCHAR(15),
price INT,
address VARCHAR(50),
city VARCHAR(15),
Date_Listed DATE,
Bedrooms INT,
Bathrooms INT
)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (1, 'Apartment', '5000sqft',500000, 'Anna Nagar', 'Chennai', '2022-05-10', 3, 2)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (2, 'Villa', '20000sqft',500000,'South Goa', 'Goa', '2020-01-11',5,3)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (3, 'Bungalow', '2000sqft',500000,'Juhu', 'Mumbai', '2015-01-11',20,6)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (4, 'Farmhouse', '2000sqft',500000,'Manikonda', 'Hyderabad', '2014-01-11',5,3)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (5, 'Duplex', '2000sqft',500000,'Saket', 'Delhi', '2012-01-11',2,1)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (7, 'Ranch', '2000sqft',500000,'Indiranagar', 'Banglore', '2019-01-11',4,2)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (8, 'Villa', '7000sqft',4500000,'New Lights', 'Mysore', '2019-01-11',5,3)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (9, 'Ranch', '2000sqft',500000,'Jalwadi', 'Lucknow', '1985-04-06',4,1)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (10, 'Ranch', '2000sqft',500000,'Varoda', 'Trichy', '2001-01-11',10,2)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (11, 'Ranch', '2000sqft',500000,'New Avenue', 'Vishakapatnam', '2023-01-11',3,7)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (12, 'Duplex', '7000sqft',40000,'Royapuram', 'Porur', '2017-04-11',14,7)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (13, 'Ranch', '2000sqft',4500000,'Vanothgar', 'Ahmdabad', '2000-05-01',3,1)
""")
mc.execute("""
INSERT INTO Property_details
(property_id, property_type, area, price, address, city, Date_Listed, Bedrooms, Bathrooms)
VALUES (14, 'Condo', '72000sqft',4500000,'Central Park', 'New York', '2014-01-11',10,5)
""")
mydb.commit()
TKINETR CODE FOR WELCOME PAGE:
def thing():
pass
root = tb.Window(themename="darkly")
my_label1 = tb.Label(text="Real Estate Management",font=("Times New
Roman",30),bootstyle="Warning")
my_label1.pack(pady=50,padx=100)
my_label2=tb.Label(text="Welcome to the start page",font=("Times New
Roman",25),bootstyle="Success")
my_label2.pack(pady=55,padx=105)
my_frame = tb.Frame(root,bootstyle="default")
my_frame.pack(pady=40)
my_button = tb.Button(my_frame,text="Continue to the Main
Menu",bootstyle="warning",command="thing")
my_button.pack(pady=50,padx=110)
root.title("Real Estate Management-Welcome Page")
root.geometry("500x350")
root.mainloop()
PYTHON
SOURCE CODE
def displayproperty():
import mysql.connector
try:
mydb = mysql.connector.connect(host="localhost", user="root", password="kirthan",
database="Realestate")
mc = mydb.cursor()
mc.execute("SELECT * FROM Property_details")
print(" \t\t\t \t \t REAL ESTATE \t\t\t\t\t\t")
print(" \t\t\t\t\t ***** \t\t\t")
print("================================================================
=====================================================================
=================================")
print("================================================================
=====================================================================
=================================")
for x in mc:
str1=""
for i in x:
str1=str1 + " \t " + str(i)
print(str1)
except mysql.connector.Error as err:
print("Error:", err)
def searchproperty():
import mysql.connector
try:
mydb = mysql.connector.connect(host="localhost", user="root", password="kirthan",
database="Realestate")
mc = mydb.cursor()
pid = int(input("Enter a Property ID to search from: "))
print("Property_Id:","Property Type:","Area: ","Price: "," Address:","City :
","Date:","BedRooms:","Bathrooms:","SqrtFeets:","Rate :")
squery = "select * from property_details where property_id=" + str(pid)
mc.execute(squery)
myr = mc.fetchone()
if myr is not None:
print(myr)
else:
print("No such property found")
def deleteproperty():
import mysql.connector
try:
mydb = mysql.connector.connect(host="localhost", user="root", password="kirthan",
database="Realestate")
mc = mydb.cursor()
delnam = int(input("Enter the property ID for the property to be deleted: "))
dquery = "DELETE FROM property_details WHERE property_id = %s"
mc.execute(dquery, (delnam,))
mydb.commit()
print("Property deleted successfully.")
except mysql.connector.Error as err:
print("Error:", err)
def addnewproperty():
import mysql.connector
try:
mydb = mysql.connector.connect(host="localhost", user="root", password="kirthan",
database="Realestate")
mc = mydb.cursor()
mc.execute(aquery, data)
mydb.commit()
print("Property added successfully.")
except mysql.connector.Error as err:
print("Error:", err)
def updateproperty():
import mysql.connector
try:
mydb = mysql.connector.connect(host="localhost", user="root", password="kirthan",
database="Realestate")
mc = mydb.cursor()
PropertyID=int(input("Enter the property ID for which rate is to be updated:"))
Price=int(input("Enter the updated price:"))
mc.execute("UPDATE property_details SET Price='{}' WHERE
property_id='{}'".format(Price,PropertyID))
mydb.commit()
print("Price is Updated")
except mysql.connector.Error as err:
print("Error:", err)
def menu():
c = "y"
while c == "y":
print("Press 1 To display all the Properties")
print("Press 2 To search from an already existing property")
print("Press 3 To delete an existing property")
print("Press 4 To add a new property")
print("Press 5 to Update the price of property")
choice = int(input("Enter Your Choice: "))
if choice == 1:
displayproperty()
elif choice == 2:
searchproperty()
elif choice == 3:
deleteproperty()
elif choice == 4:
addnewproperty()
elif choice == 5:
updateproperty()
else:
print("Enter a correct input")
menu()
SAMPLE OUTPUT:
OUTPUT FOR TKINTER PROPGRAM:
DISPLAYING PROPERTIES:
DELETING PROPERTY:
ADDING NEW PROPERTY:
UPDATING THE PROPERTY:
SEARCHING PROPERTY:
MYSQL DATABASE:
MYSQL FIELD TYPES:
MYSQL DATA:
CONCLUSION
The Real Estate Development Management System, crafted using Python programming
language and integrated with MySQL, represents a pivotal advancement in the real estate
project oversight, offering enhanced efficiency, transparency, and accessibility. Its robust
fostering scalability for future adaptability. This project stands as a testament to the
We can further enhance the system's functionality and user experience, several avenues for
mechanism utilizing filters based on property type, location, price range, and amenities
could significantly refine property search capabilities, offering users more tailored results
WEBSITES USED:
www.w3schools.com
https://www.geeksforgeeks.org/
BOOKS USED :
NCERT Textbook Class XII , CBSE
NCERT Textbook Class XI ,CBSE
Sumita Arora Class XII Textbook
Sumita Arora Class XI Textbook