I'm building a property platform similar to Zillow, and as we've started getting users, it's clear we need to accommodate various professionals in the industry beyond just real estate agents, like those involved in new developments and construction. This has led to a more complex database structure. I understand it since it's my creation, but I want to ensure that whoever takes over can manage it easily. Should I have fewer tables with complex relationships, or go for more tables with simpler logic? What's the best practice here?
5 Answers
For a platform like yours, you're facing a classic dilemma with normalization. I suggest a balanced approach: keep your main tables normalized (like users and listings) but consider creating polymorphic associations for varying attributes. Avoid cramming everything into one massive listings table with a bunch of nullable fields—this can complicate things down the road when more types come into play.
Going for smaller, manageable tables is usually the way to go. Having a big, complicated table can become a nightmare as your platform grows.
Definitely aim for smaller, coherent pieces. They’re generally better as long as they don’t create too many complex connections. And don’t forget to look into database normalization and best practices—it'll pay off!
Simple tables with clear, straightforward relationships are often the best route. The 'one mega table' strategy leads to confusion with null values and mystery columns, which makes your logic harder to manage in the application later. You might want to maintain a clean core model (like properties, users, etc.) and use subtype tables for unique cases like new developments.
It really depends on your specific use case, but personally, I lean towards reducing complexity. This usually makes it easier for others to pick up the project later on.

Related Questions
How to Build a Custom GPT Journalist That Posts Directly to WordPress
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads