Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have to initialize a DB(postgresql) and create the tables to use; Which is the best way to do it in terms of program design?

In other words I have to create a static class, or a class and therefor an object or through other ways?

I'm using Java but i think that is irrelevant.

share|improve this question
1  
I think the best way is to identify your business requirements first and design your database accordingly. –  Dan Bracuk Nov 22 '13 at 18:56

1 Answer 1

As a Java user, you'll probably end up using Hibernate:

http://www.hibernate.org

Don't mindlessly start coding, though, because using an Object Relational Mapper (ORM) is no excuse for knowing at least enough database theory to be able to design a properly normalized schema. And probably a lot more database theory than that, in fact, if performance is a consideration.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.