DBMS Report
DBMS Report
Project Report
Group Members:
Real estate is a growing business in India and is a significant sector which plays a
crucial role in the country’s economy. Daily, a large number of property dealings
are happening in India. In this, you have to keep track of a lot of data like
properties sold, rented, bought, customer and seller details and details of financial
transactions.
We have designed a database management system for property dealers to help them
easily store data. Other than storing it will also allow you to insert new data or
modify the existing data easily. The data will be stored safely and can be retrieved
in the least amount of time. The database will contain details of all sellers, buyers,
agents, properties sold or rented, and transactions.
We will act like middlemen between buyers and sellers. Buyers can view all the
properties in Ahmedabad and Gandhinagar that are available for sale or rent on our
website along with their selling price or the rent. They will also be able to see the
images of the properties and all the amenities. They can also plan a meeting with
our agents for further details online or offline at their convenience.
Tech Stack used in making Property Management system:
● Frontend:
1. Html
2. CSS
3. JavaScript
● Backend:
1. Node JS
2. Postman API
3. Express JS
● Database:
1. MYSQL
2. AIVEN CLOUD
Functionalities present in our Property Management System
3. AddMoney: This function will add a given amount of money and will return
the new balance of the user. It will take User_id and amount as input
parameters. It will fetch the current balance of the user and add the amount
given in the input to that current balance and calculate the new_balance as
per the formula:
4. DeductMoney: This function will deduct a given amount of money from the
user’s balance and will return the new balance. It will take User_id and
amount to be deducted as the input parameters. It will fetch the current
balance and check that current_balance > amount to be deducted. If the
current balance is greater then the function will return a message: “Amount
deducted successfully” and the new_balance. But if the current_balance is
less then it will return a message: “Insufficient balance. Deduction failed”.
Stored Procedures
The index will be on a grading scale of 5. Happiness index score will reflect how
good the property is.
3. GetAvailableBalance: This procedure will calculate and display the
available balance of any user. It will take User_id as the input parameter and
calculate the balance of that user.
Link:
https://miro.com/app/board/uXjVKZcor68=/?share_link_id=516751607347
Table Design (Data Dictionary)
MySQL Queries of table creation
1. Properties table
2. Property_type
3. Images
4. Happiness_index
5. Property_Rental
6. Property_Sale
7. Agent
8. Agent_Properties
9. User
10.User_type
11.Ratings
12.Commissions
13.Master_transactions
14.Transaction_log
15.Appointment
Code to connect front-end and back-end
Stored Functions and Procedures codes
1. Calculate_Rent
Code:
Calling block:
2. GetPropertyDetails
Calling block:
3. AddMoney
Code:
Calling block:
4. DeductMoney
Code:
Calling block:
5. GetAverageRating
Code:
Calling block:
Stored Procedures Codes
1. GetUserTransactions
Code:
Calling block:
2. CalculateHappinessIndex
Code:
Calling block:
3. GetAvailableBalance
Code:
Calling block:
4. Calculate_Commision
Code:
Calling block:
5. GetPropertyStatus
Code:
Calling block:
Triggers
1. Check Deposit: For any property on Rent, its deposit amount must be greater
than 10,000. Otherwise trigger will not allow the new record to be inserted
and hence property cannot be rented.
Code:
DELIMITER //
DELIMITER ;
2. Update balance: If any transaction occurs then the balance of users gets
changed. Balance of payer will decrease will that of payee will increase.
This trigger will automatically update the balance of both the users once the
transaction is completed.
Code:
DELIMITER //
DELIMITER ;
3. Update average rating: If a new rating is given then the average rating will
be updated automatically.
Code:
DELIMITER //
DELIMITER ;
4. Check password: If a new user registers himself and his password length is
less than 10 then it will display an error message.
Code:
DELIMITER //
DELIMITER ;
5. Positive Happiness index: This trigger will check that none of the variables
used in calculating happiness index are negative.
Code:
DELIMITER //
DELIMITER ;
Screenshots of result generated after functions and procedures are
called on the front-end
Trigger-1
If deposit for any rented property is less than 10000 then the following trigger will
be fired:
Trigger-5
If any variable involved in calculation of happiness index then the following
trigger will be fired:
Screenshots of our website
1. About Us Page
Once, anybody opens our website he/she will see the About Us page which tells
the user about our company. It gives brief information about the functioning of our
website. Users will also get to see 4 options namely Home, Properties, Services
and Contact Us on the top right corner. He/She can scroll to any of the pages from
here based on their needs.
2. Home Page
This is our home page. You can navigate to this page by clicking on the Home
Page option on the About Us page. The home page gives any new user the
information about what type of services we offer at our website
On scrolling down the page you will get to see the list of areas like SG highway,
Science city, Sindhu bhavan where we have either sold or rented any property. You
will also see some images of the properties which are out for rent or sale.
On scrolling further you will be able to see the steps of how we select any property.
Many properties are listed on our website for rent or sale. We follow a procedure
and have certain conditions. Properties which fulfill those conditions are then
approved and rest are removed.
This is the end of our home page which lists the benefits of our website like we are
operational in Prime locations of Ahmedabad and Gandhinagar, We offer modern
properties with excellent service. It also displays some stats like how many clients
we have served till now and how many property deals we have done.
3. Login / Sign up Page
This is the page where a new user will sign up by entering some details like full
name, email address and by creating a password. The existing users will have to
enter their created email and password for Login.
4. List Your Property
This page is for the sellers and renters who want to sell/rent their property. To list
their property on our website they will have to upload some details like about the
property, images of the property, documents etc.
5. Add Money
6. Services
7. Transactions Page
8. Contact Us
9. User Dashboard
18. Seller
19. User Transaction