Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: hibernate.hbm2ddl.auto consult and doubts

  1. #11
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    There are DB designer tools that like ErWin or PowerDesigner that can (and should) be used to design db schemas.
    always i use the hbm files, the class diagram normally with hibernate should be the same
    that ER for he DB

    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  2. #12
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by dr_pompeii View Post
    thats the problem the boss want the system to enter to production in a 95% and i am afraid to listen, "i want this....." and change the db schema


    i will read carefully that, coz i dont how do that ,thanks for the tip


    so you dont use your hbm mapping files to create the tables?

    wooh, how you manage at least 50 tables with 20 fields ? manually?

    regards and thanks for your time
    Never was in position to do it - never have used Hibernate for such kind of applications. The biggest application that I have done with Hibernate had about 10 tables (w/o Hibernate - about 300 tables ).

    First of all, I woul rather start from DB tables, then Java objects and only then - mappings. But in any case I would use a tool only for initial generation and not for the evolution (except validation mode of hbm2ddl).

    Do not forget that data in DB have tendencies to outlive any given application (if not technology) and to be shared with many ones (even if it was not initially supposed). So DB data structures is of utmost importancy.

    Regards,
    Oleksandr

  3. #13
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by dejanp View Post
    There are DB designer tools that like ErWin or PowerDesigner that can (and should) be used to design db schemas. Anything else will, on any project of a decent size, sooner or later, end up as another IT disaster.
    For me nothing is more clear and convinient as good old plain SQL scripts (with decent comments). Tools mentioned do not give clear overviewof any DB with more then, dare to say, 100 objects. Diagrams becomes ovecrowded and/or clottered.

  4. #14
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    The biggest application that I have done with Hibernate had about 10 tables (w/o Hibernate - about 300 tables ).
    pretty number

    First of all, I woul rather start from DB tables, then Java objects and only then - mappings.
    right order, same approach i do

    Do not forget that data in DB have tendencies to outlive any given application (if not technology) and to be shared with many ones (even if it was not initially supposed). So DB data structures is of utmost importancy.
    thats right, the baseline of the rest of the layers

    For me nothing is more clear and convinient as good old plain SQL scripts (with decent comments). Tools mentioned do not give clear overviewof any DB with more then, dare to say, 100 objects. Diagrams becomes ovecrowded and/or clottered.
    lower programming is powerful always, Erwin for few tables is nice, but for a lot
    is a wonderful hell



    regards
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  5. #15
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Quote Originally Posted by al0 View Post
    For me nothing is more clear and convinient as good old plain SQL scripts (with decent comments). Tools mentioned do not give clear overviewof any DB with more then, dare to say, 100 objects. Diagrams becomes ovecrowded and/or clottered.
    For you perhaps, but you are not writing the application and documentation for yourself.

    You should have many diagrams, showing different facets of the schema. One diagram representing all the tables of a non-trivial system is as usefull as reading a telephone book from cover to cover.

  6. #16
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by dejanp View Post
    For you perhaps, but you are not writing the application and documentation for yourself.

    You should have many diagrams, showing different facets of the schema. One diagram representing all the tables of a non-trivial system is as usefull as reading a telephone book from cover to cover.
    Documentation, first of all, shal lbe useful. To be useful it shall be concise, or nobody would read it And text is unbeaten in this area (save mathematical formulas, but htat another matter). And you would not believe how many peoples have started projects with me screaming for diagrams and ended with (almost) all diagrams in trash cans and (almost) all descriptions in text.

    Diagrams are great for teaching purpose, for presentation to peoples that anyway would undestand nothing and for child-toy projects. In real life (from my experience) the do not pay for yourself.

    But this, really, does not belong to this thread and even to this forum.

  7. #17
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by dr_pompeii View Post
    pretty number
    Really, it was very small number achived with very careful DB design as many applications with similar functionality (it was almost "all-in-one" banking system) use literally thousands of tables.

  8. #18
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Quote Originally Posted by al0 View Post
    Documentation, first of all, shal lbe useful. To be useful it shall be concise, or nobody would read it And text is unbeaten in this area (save mathematical formulas, but htat another matter). And you would not believe how many peoples have started projects with me screaming for diagrams and ended with (almost) all diagrams in trash cans and (almost) all descriptions in text.

    Diagrams are great for teaching purpose, for presentation to peoples that anyway would undestand nothing and for child-toy projects. In real life (from my experience) the do not pay for yourself.

    But this, really, does not belong to this thread and even to this forum.
    Agreed, I'm not talking about ER diagrams as only documentation but ER designer tools as documentation managers - they allow you to add your free text comments to anything you want. You can always generate commented ddls from ER tools. You can not generate meaningfull ER diagrams from ddl.

  9. #19
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    Quote Originally Posted by dejanp View Post
    Agreed, I'm not talking about ER diagrams as only documentation but ER designer tools as documentation managers - they allow you to add your free text comments to anything you want. You can always generate commented ddls from ER tools. You can not generate meaningfull ER diagrams from ddl.
    I (and my teams) have worked with them and have dropped them as absolutely unsatisfactory, their hottest proponents have completely resigned.

    And yes, I can not generate meaningful ER diagrams from ddl, but I seriously doubt if such beast as "meaningful ER diagram" exists at all.

    You know XP motto "code is a design". The same is applicable to the DB design.

    And anyway those tools usually require some manual manipulation of generated scripts, as they do not support DBs 100% (a specially newest DB versions).

    But to great extent it is matter of taste so no discussion point.

  10. #20
    Join Date
    Sep 2004
    Posts
    1,086

    Default

    Quote Originally Posted by al0 View Post
    You know XP motto "code is a design". The same is applicable to the DB design.
    Yes, and I don't believe in XP.

    Quote Originally Posted by al0 View Post
    But to great extent it is matter of taste so no discussion point.
    Ok, agreed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •