简体   繁体   English

Java JPA:使用DB推出桌面应用程序的最佳实践?

[英]Java JPA: Best practice for rollout of desktop app with DB?

I just wanna ask for best practices about rollout of java desktop apps including an embedded DB (like JavaDB). 我只是想询问有关推出Java桌面应用程序(包括嵌入式DB(例如JavaDB))的最佳实践。

1. Question: 1.问题:

I create version 1.0 of my app with an embedded JavaDB for rollout. 我使用嵌入式JavaDB创建了我的应用程序的1.0版。 Should I deliver the DB files within my rollout package or should the app create the embedded DB files by first start? 我应该在发布程序包中交付数据库文件,还是应用程序应在首次启动时创建嵌入式数据库文件?

2. Question: 2.问题:

Now it's time for release 1.1 and the DB structure changed. 现在该发布1.1版了,数据库结构也发生了变化。 How to deliver the update? 如何发布更新? Is there any best practive for release strategies? 是否有最佳的发布策略?

Thanks, Daniel 谢谢,丹尼尔

  1. Do whatever is easier for you. 做对您来说更容易的事情。 Personaly I think beeing able to create a new DB on the fly is more conventient for developers. 我个人认为beeing能够即时创建新的数据库对于开发人员来说更加方便。
  2. You need an update script. 您需要一个更新脚本。 If this happens more than once, put the version number 1.0, 1.1, ... into the db. 如果多次发生这种情况,请将版本号1.0、1.1,...放入数据库。 This way you can check what update scripts have to run automatically and you can make sure your software and db do match. 这样,您可以检查哪些更新脚本必须自动运行,并且可以确保您的软件和数据库确实匹配。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM