This system is not about real estate. It's for a temporary housing institution, and the main issues are dealing with the tenants, not the properties.
Thank you for your post, it has a lot of good information.
One detail you didn't notice, however, is that this system is using CiviCRM. I realize that CiviCRM is not well known, but it's a CRM tool that runs inside of Drupal (or WordPress) and thus the concepts of Contacts and Relationships between them is already available there. We have 3 Contact Types:
Building
Unit
Tenant
and they share Relationships between each other (as in Unit 1A is "Unit Of" Building 123 Oak St.).
Other concepts such as Notes and Activities are also available in CiviCRM.
Some of the functions I wrote are, more or less, just wrappers are the CiviCRM API.
One issue, that we didn't foresee, is that the CiviCRM API is very slow. As our database grows, it's becoming too slow to use that for day to day activities. So we are implementing now a few custom tables to mirror just the current status of all Tenants and Units, and those tables are very simple and very fast to access. The full history of all Activities and Relationships remains in the CiviCRM records.
Given that this changes a lot of the code, I am taking this opportunity to refactor, and that was part of the reason I posted. I also appreciate the chance to discuss this as I work alone -- freelance and maverick style.
Anyhow, now I am creating these classes, to begin with:
Building
Unit
Tenant
and I am trying to make this actually object-oriented, this time around.
First build was in a rush and every new feature was news to me -- it was truly built on the fly, but the basic features they really needed are in place and working. Now I have a bit of time/space to rewrite this to make it faster, and also easier to build upon for the rest of the features.
Thank you both for the input. I really appreciate it.