Prompt
Should I use PostgreSQL if I don't know my final data model yet?
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
Yes—PostgreSQL is usually a good choice even if you don’t know the final data model yet.
Why it works well in that situation:
- Flexible enough to evolve: You can start with a simple schema and add tables, columns, constraints, and indexes later.
- Handles semi-structured data:
JSONBis very useful when parts of your model are still uncertain. - Strong migration support: Schema changes are manageable with tools like Flyway, Liquibase, Alembic, Prisma, etc.
- You can still enforce structure gradually: Start loose, then add constraints as the model stabilizes.
- Widely supported and reliable: Good default choice for many projects.
When PostgreSQL is especially a good fit:
- You expect your data model to change over time
- You want to prototype quickly
- You may need both relational queries and document-like flexibility
- You care about correctness, transactions, and future scalability
When you might choose something else:
- If you truly have no idea what the data will look like and want maximum schema freedom, a document DB like MongoDB may feel easier initially
- If you need extremely simple key-value storage or event logs, another storage layer might be better
- If your project is tiny and short-lived, you might optimize for developer speed over long-term structure
A practical approach:
- Start with PostgreSQL.
- Keep the early schema minimal.
- Use
JSONBfor uncertain fields. - Add migrations as the model becomes clearer.
So the short answer is: yes, PostgreSQL is often one of the best choices when the final model is still unknown.
If you want, I can also help you decide between PostgreSQL vs MongoDB vs SQLite for your specific project.