← Projects

Real Estate Management Database

A rental app on a PostgreSQL database, built for CS 425

I led a 3-person team from ER diagram to working app: agents list properties, renters search, book and pay, and the database blocks double bookings.

Our entity-relationship diagram: User, Address, CreditCard, Booking, Property and Neighborhood entities, with House, Apartment, Commercial Building, Vacation Home and Land property types.
Our ER diagram, drawn in Microsoft Visio. All names, emails and cards in the screenshots are test data.

01 The Problem

The brief: a real estate app where people register as agents or prospective renters. Renters save addresses and credit cards, each card billed to one of their own addresses, then search for properties and book them. Agents add, update and remove listings and manage the bookings for their agency. Every rule had to hold in the database itself, not just the screens: only available properties can be booked, and a billing address can't be deleted while a card still uses it.

02 My Process

Three phases, from diagram to working app. Pick a step.

Our full ER diagram with entities, attributes, relationships and cardinalities.Page 1 of our ER model deliverable: the entities and attributes list, with primary and foreign keys marked.

Step 01 · Phase I

Modeling the data

We drew the ER model together in Microsoft Visio: users with renter or agent profiles, addresses, credit cards, properties and bookings, five property types (house, apartment, commercial building, vacation home and land), and a bonus Neighborhood entity with crime rates and nearby schools. Next to the diagram we wrote the rules it had to enforce, like a card's billing address belonging to the same user and confirmed bookings for one property never overlapping.

  • ER modeling
  • Cardinalities
  • Microsoft Visio

03 The Solution

The Real Estate App: a Python Tkinter desktop app on our PostgreSQL schema, with tabs for Schema, Register, Payment & Addresses, Agent Properties, Search & Book, Manage Bookings and Rewards. Renters book with a saved card and the total is calculated for them. Renters can cancel their own bookings, and agents can view and cancel bookings for their agency's properties.

  • Search and Book tab: a booking created for new dates, with the message Booked. Total: 2100.

    A booking for open dates goes through, with the total calculated.

  • Manage Bookings tab: a renter's bookings at the top and an agent's view of bookings for their agency below.

    Renter and agent views of the same bookings.

04 The Outcome

We delivered the ER model, the SQL schema and sample data, the app, a step-by-step demo walkthrough, and a setup guide for PostgreSQL, pgAdmin, DataGrip and PyCharm so anyone could run it.

What I'd change: Our grader pointed out that putting every property type in one PropertyType table left many columns empty and repeated data. I'd give each type its own table, the way our ER model already split houses, apartments, commercial buildings, vacation homes and land.