简体   繁体   English

项目中包含Derby db数据吗?

[英]Derby db data included in project?

I'm currently working on a project for school with a rather big data model. 我目前正在为一个具有较大数据模型的学校项目工作。 Right now I use the constructor of the model class to fill it with static data. 现在,我使用模型类的构造函数将其填充为静态数据。 Now I want to get rid of that and put all the data in a database. 现在,我想摆脱它,并将所有数据放入数据库中。 But without the need of a external server. 但无需外部服务器。 I have to hand over the project in the end to have it rated and getting a 0% rating because my internet blacks out yet again would be very disappointing. 最后,我必须交出该项目以使其获得评级并获得0%的评级,因为我的互联网再次中断将是非常令人失望的。

After quick look around I found out about derby . 快速浏览后,我发现了关于德比的信息 But I'm unsure where the thing stores its data. 但是我不确定这个东西存储在哪里。 Is the database + data included in the project? 数据库+数据是否包含在项目中? Even when I export it as a .jar? 即使我将其导出为.jar? If not is there any alternative that does these two things? 如果没有,那么做这两件事有没有其他选择?

I think the explanations you're looking for are most easily found here: 我认为您在寻找的解释最容易在这里找到:

http://db.apache.org/derby/docs/10.10/devguide/cdevdvlp21955.html http://db.apache.org/derby/docs/10.10/devguide/cdevdvlp21955.html

and

http://db.apache.org/derby/docs/10.10/devguide/cdevdvlp40724.html http://db.apache.org/derby/docs/10.10/devguide/cdevdvlp40724.html

Specifically, the second link takes you to the section of the documentation describing how a database is stored on your file system, and how you can package a (read-only) database into a jar file if you want. 具体来说,第二个链接将带您到文档的那一部分,该部分描述了数据库如何存储在文件系统上,以及如何根据需要将(只读)数据库打包到jar文件中。

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

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