Announcement Announcement Module
Collapse
No announcement yet.
Application supporting many databases Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Application supporting many databases

    Hello

    Note: This is not a question directly related to spring.

    I'm developing a webapp using spring/spring mvc. I am asked to build it in a way to be able to support many different database servers (currently SQL Server and MySQL). I will be using hibernate, so the syntax of SQL queries is not an issue. What concerns me is the database schema creation.
    Is there a strategy to get me going? I will only be using very simple database features (indexes, FKs and auto incremented primary keys).

    How do you guys do it? I'd like to avoid having to maintain 2 (or more) SQL files for database schema creation.

    many thanks

  • #2
    Hibernate can create the schema for you. Have a look at the Hibernate tools section of the website.
    http://www.hibernate.org/hib_docs/v3...oolsetguide-s1

    Comment


    • #3
      Thanks for you reply.

      Is there any other way? I'd like to be generating the first schema by hand (using a database client tool) if possible.

      Comment


      • #4
        One of the options to to output it to a file, isn't this enough?
        --output=my_schema.ddl

        Comment


        • #5
          This worked exceptionally well.

          Thank you very much!

          Comment


          • #6
            Not a problem, glad you found it useful. I've not used the Hibernate tools much but they do look pretty good!

            Comment

            Working...
            X