Using Grails internal DB
I am creating an application using Grails Framework for which I plan to use the database which is provided by Grails. Just wanted to be sure of the advantages/disadvantages befo开发者_开发百科re proceeding. Does using the internal database invite issues?
Thanks!
By default, Grails has an in-memory database, which means, that whenever you shut down your application, all your data is lost... probably not what you want.
You could change this to a file-database, and this file-database would by default end up in your Grails application root. If you deploy this to an app server and undeploy again, your data is lost... again, probably not what you want.
I would recomend installing a MySql database. It's easy, and you have your data separate from your application.
The internal database is an in-memory database, so all your data disappears when the server is restarted. It seems very unlikely that you would want this behaviour for a real application, so I recommend MySQL, Postgres (or similar) instead.
精彩评论