Here, we always start with the mappings, and then we generate the POJOs *and* the database schema from there.
Really, though, you will wind up learning an enormous amount about both Java performance issues and database performance issues. We certainly have. (A Java example: don't have thousands of children in a Hibernate collection, Hibernate adds very little value and often tries to load them all, which you never want. A DB example: make sure you add indices on foreign keys, because Hibernate won't auto-generate them.)
So the moral is, it doesn't so much matter where you start -- you have to understand both sides and their performance problems either way. Just make sure that whatever you do, you write the system in an incremental way, so you can test it as you go and find any performance problems early. Never, ever go off and spend months writing a huge pile of code! Write a REAL SMALL pile of code, performance test it, and then add to it and repeat ;-) That's the real way to avoid digging yourself a deep hole that you didn't see coming.
Cheers,
Rob
|