什么语言被广泛用于android的数据库? [英] What language is widely used for the databases for android?

查看:70
本文介绍了什么语言被广泛用于android的数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

注意:我在谷歌和这个网站上搜索过但找不到答案。



现在我已经学会了大部分Java(对于应用程序的逻辑和XML(对于应用程序的用户界面),我觉得我应该测试我的技能,用我的知识开发一个简单的应用程序。然后,我意识到如果我想存储诸如用户数据之类的东西并操纵该数据,我可能需要一个数据库。我在想是否可以使用XML来存储数据,但我在线阅读它并不是一个好主意。后来我发现我可以使用SQL存储数据,这是Android支持的语言。



所以我的问题是,哪种语言最流行的android数据库应用程序,SQL或XML?

Note : I've searched on Google and this site for an answer but couldn't find one.

Now that I've learnt most of Java (for the logic of an app) and XML (for the user interface of an app), I felt like I should test out my skills develop a simple app with my knowledge. It's then that I realized that I might need a database if I want to store something such as user data and manipulate that data. I was thinking if I could just use XML for storing data but I read online it wouldn't be a good idea. Later I found out I could use SQL for storing data which is a supported language by Android.

So my question is, which language is most popular for the databases of android apps, SQL or XML?

推荐答案

从某种意义上说,SQL和XML是比语言更多的技术和工具(是的,两者都有名称中的语言) 。两者都是用于数据存储的技术,但具有不同的范围。所以这取决于你想要存储什么以及你想如何处理它。首先阅读: http://faculty.ksu .edu.sa / mathkour / XML%20DB / XML%20and%20Relational%20Database%20Systems%20-.pdf [ ^ ]



从RDMS开始,您手边有SQLite: http://www.vogella.com/tutorials/AndroidSQLite /article.html [ ^ ] ,当然,也是XML工具: http:// www。 ibm.com/developerworks/xml/library/x-android/index.html?ca=drs- [ ^ ]。但也有其他选择,比如No-Sql(像这样: http://www.oberasoftware.com/jasdb-2/ [ ^ ])。
In the sense you are asking, SQL and XML are more technologies and tools than languages (yes, both have Language in their name). Both are technologies used for data storage, but with different scope. So it depends on what you want to store and how do you want to do with it. Read this first: http://faculty.ksu.edu.sa/mathkour/XML%20DB/XML%20and%20Relational%20Database%20Systems%20-.pdf[^]

As of RDMS, you have SQLite at your hand: http://www.vogella.com/tutorials/AndroidSQLite/article.html[^], but of course, XML tools too: http://www.ibm.com/developerworks/xml/library/x-android/index.html?ca=drs-[^]. But there are other alternatives too, like No-Sql (like this: http://www.oberasoftware.com/jasdb-2/[^]).


SQL是一种访问数据库的方法。虽然它在技术上是一种语言,但并不是完全普遍的。某些数据库支持某些查询数据的方式,其中SQL是最常见的。许多数据库在SQL上都没有什么变化,所以它的SQL类似语法,但是,例如,并非所有为Microsoft Access编写的SQL都与Microsoft SQL Server一起使用,反之亦然。



XML不是一种语言,它是一种DOM(文档对象模型)。它不再是Word文档或图片的语言。您使用XML为您的用户界面创建规范,但它不是您编写代码的语言。



如果您想在Android中使用数据库,那么您可能必须使用 SQLite [ ^ ]。我不知道Android支持的任何其他数据库。我确信有些库可以支持其他类型。



SQLite易于使用,我赞成将信息存储在XML(文本)文件中。
SQL is a method for accessing a database. While it is technically a language, its not completely universal. Certain databases support certain ways of querying the data, with SQL being the most common. Many databases put little twists on SQL so its SQL-like syntax but, for example, not all SQL written for Microsoft Access works with Microsoft SQL Server and vice-versa.

XML is not a language, its a DOM (Document Object Model). Its no more a language than a Word document or a picture. You use XML to create a specification for your user interface, but its not a language that you write code in.

If you want to use a database in Android, you are probably going to have to use SQLite[^]. I don't know of any other databases that Android supports out of the box. I'm sure there are libraries out there to support other kinds.

SQLite is easy to use, I would favor that over storing information in XML (text) files.


看看这里:



http://www.vogella.com/tutorials/AndroidSQLite/article.html



ETA - 与sol'n 1交叉发布。
Have a look here:

http://www.vogella.com/tutorials/AndroidSQLite/article.html

ETA - cross-post with sol'n 1.


这篇关于什么语言被广泛用于android的数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆