[英]Database on Raspberry pi
I am working on a project where the raspberry pi (model B) runs JAVA application to connect to and retrieve data from a Router. 我正在研究一个项目,其中树莓派(模型B)运行JAVA应用程序以连接到路由器并从路由器检索数据。
What i want to know is the best approach or the best database that i should use to store that data retrieved from the router. 我想知道的是最好的方法或最好的数据库,用于存储从路由器检索到的数据。 Knowing that i will need to build another android application that should connect to that database (on the raspberry pi) and display that data. 知道我将需要构建另一个Android应用程序,该应用程序应连接到该数据库(在rapiberry pi上)并显示该数据。
So, what database that is compatible with the java application and the android application? 那么,哪个数据库与Java应用程序和android应用程序兼容?
Also, later on i wish i could run the RPI as a server that enables me to connect to that database from anywhere. 另外,稍后我希望我可以将RPI作为服务器运行,使我可以从任何地方连接到该数据库。
Keeping in mind that: I am new to Raspberry pi New to Database 请记住:我是Raspberry pi的新手
我建议您看看OrientDb是一个NoSql Java图形文档数据库(您可以选择),它也支持很多查询范例和一个Sql方言(您没有联接),速度快,轻便并且支持本机其余查询,我已经在raspberry pi上进行了测试(即使是在2/3 raspberry节点上的分布式多主模式下),它的性能也很好,令人高兴的是,它允许您以不同的方式进行思考,数据显示为一个Java对象通过HTTP在Json中通过rest范式向您公开,因此您可以使用html 5和诸如angularJs这样的jscript框架在客户端上考虑您的客户端应用程序(并且您可以直接在有效的数据库上“部署”静态资源)就像轻巧的应用服务器一样)
Almost All the Databases are Compatible with JAVA.And Hardly I belive that you will not have such privilege to choose Database while develop real time Application . 几乎所有数据库都与JAVA兼容。而且,我几乎不相信在开发实时应用程序时,您没有选择数据库的特权。
Java and Android Both are not different , both are same on a Pillar.There will be no problem because of using Database. Java和Android两者没有什么不同,在Pillar上都相同,因为使用数据库不会有问题。
我建议使用SQLite,因为Android本机使用它,并且不需要像* SQL之类的其他DBMS那样大量的资源
This answer follows the previous comments. 该答案遵循之前的评论。 Let's say : 比方说:
So, to sum up, eclipse and java app both need a mysql jdbc driver, configured the right way. 因此,总而言之,eclipse和java app都需要一个mysql jdbc驱动程序,并且配置正确。
Later, you'll want to access your db through your android app. 稍后,您将要通过android应用访问数据库。 You'll need to configure your router with port forwarding, to access your db from outside. 您需要使用端口转发配置路由器,以从外部访问数据库。 But this is out of topic. 但这是不合时宜的。 I let you search. 我让你搜索。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.