We started (just me and my friend) working on a website. As a part design phase we have finished the drawing a Site Map, decided on the content in each of the web page and the navigation.
As we want to use the Spring MVC and Hibernate we want to start on Classes design (domain classes) first so that the database part is taken care by Hibernate (Except for some tables for static data). Does our approach correct? Is my understanding correct that when we use Hibernate the 80% of the database design can be forgotten?
3
No, your database is still important
NHibernate is an object-relational mapping (ORM) solution for the projects: it provides a framework for mapping an object-oriented domain model to a traditional relational database. Thus it is important to keep your database in a good shape.
Otherwise, you may face with performance issues once you project starts to grow.
In addition, it is always pays back if you keep your database design as normalized and as good as possible.
References to support my point:
- NHibernate – Lessons Learned
- Identifying NHibernate-Related Bottlenecks through Performance Monitoring
- NHibernate Best Practices with ASP.NET
1
Your understanding is correct. Your domain model will be the key driver for database schema.
But managing the schema is best done outside of hibernate, though hibernate can create tables for you based on configuration. This way, though you have to manage database schema separately, you will have full control to manage the primary keys, constraint, foreign keys etc. Also, you need not worry about data being wiped every time you re-deploy the application.
You can leave it for the moment, but don’t, really DON’T forget about it. It is important to keep your database in a good shape, as mentioned by others. Hibernate will create you schema, it might be okay. But have a look at it before you finish work, chances are you will find serious flaws.
Personally I’m with @Emmad Kareem. Database design has to be done up front. You can forget about 80%, your right. But make sure you don’t forget about 100%.
1
You can start coding without design (either database design or application design) if you are experienced and if your application is small.
On the other hand there aren’t applications in which too much time was spent in ; so by doing design you can be pretty sure that your applications is going to be better.