-
Feb 20th, 2007, 08:33 AM
#1
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
-
Feb 20th, 2007, 08:42 AM
#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
-
Feb 21st, 2007, 01:53 AM
#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.
-
Feb 21st, 2007, 02:33 AM
#4
One of the options to to output it to a file, isn't this enough?
--output=my_schema.ddl
-
Feb 21st, 2007, 03:15 AM
#5
This worked exceptionally well.
Thank you very much!
-
Feb 21st, 2007, 03:21 AM
#6
Not a problem, glad you found it useful. I've not used the Hibernate tools much but they do look pretty good!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules