Design an extensible database model
I am currently doing a project whose specifications are unclear - well who does not. I wonder what is the best development strategy for DB development that will spread sooner or later with additional tables and relationships. I want to enable "mutability".
My main problem is that I want to apply design patterns (this is a university project) and I want to decouple constant factors from those that change by choosing appropriate design patterns - in my case MVC and a set of substructures at the model level. However, when it comes to DB, I might have to resdesign my model in my MVC approach, because my domain model at a later stage I need a different set of classes that represent DB tables. I am using Hibernate as an abstraction layer between DB and application.
Will you start with a very minimal database, just a few tables and relationships? And what if I want an efficient DB as well? I wonder what strategies are used in the real world. Stakeholder analysis, for example, is not a sufficient planning decision when it comes to changing requirements. I think - at the DB level my template design ends. So, there is a breakout whose impact I would like to minimize with a clever strategy.
a source to share
In a simple answer: BE MINIMALISTIC.
Try to figure out the main entities. Don't worry about the properties, you will fill them in later. Then create relationships between entities. Build a test application using wour favorite ORM (Hibernate?), Build some unit tests and voilà, you have a minimal operating system. :)
a source to share
In unclear situations, I prefer a minimalistic database design that supports the currently known needs. My experience is that any attempt to be smart, to model future needs, makes the model more complex. When new needs arise, they are often in unexpected places. Additional modeling for future needs does not match new needs, but makes refactoring even more difficult.
Since you've already chosen Hibernate to be able to decouple the DB design and the OO model, I think keeping the DB as simple as possible is a good choice.
a source to share
"I am currently doing a project whose specifications are unclear."
Given the database tag, I am assuming that you are asking this question in the context of a database.
Remember that the database is a set of FACT INDICATIONS (estimated capitalization).
If it is not clear what "fact statements" your user wants to log into the database, you simply cannot define (structure) your database.
And you will be helping both yourself and the user by first trying to clear anything that is unclear.
a source to share
What you describe is typical of almost every project. However, there are a few things you can do.
Try to isolate the concepts (not their implementations) of your problem area. Remember: extending the data model is almost always easy (add a new table, new column, etc.), but changing the data model is difficult and requires data transfer.
I advocate using an Agile development process. Implement only what you need right now, but make sure you understand the whole problem before modeling it.
Another thing that you should check before you start tearing off your code depends on the infrastructure you choose. Using a relational database when you want to change your schema very often is usually a bad match. Document databases are schemaless and therefore more flexible. I think you should appreciate that using a relational database is really the right fit for your application.
a source to share
A project does not start with requirements that are fully known and fixed at all times. Take a flexible, iterative approach to database design so you can make changes at design time.
All database designs are extensible and subject to change throughout their lifetime. Don't try to avoid change. Just make sure you have the right people and processes to effectively manage change when this happens.
a source to share