想要一个简单的概述如何连接到一个SQLite数据库在Cocoa / Objective-C [英] Wanting a simple overview on how to connect to a SQLite database in Cocoa/Objective-C

查看:128
本文介绍了想要一个简单的概述如何连接到一个SQLite数据库在Cocoa / Objective-C的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家。我已经在Mac上尝试Cocoa和Objective-C编程几个月了,我想开始开发管理大量数据的应用程序。麻烦的是,我不确定从哪里开始数据库。

everyone. I've been experimenting with Cocoa and Objective-C programming on the Mac for a few months now, and I am wanting to start developing applications that manage large amounts of data. The trouble is, I'm not really sure where to start with databases.

我在使用SQLite的Java编程中有很好的背景。我已经阅读了一点CoreData,我没有找到任何好的资源,只是手动连接到数据库。我在寻找建议。

I have a good background in Java programming with SQLite. I've read a bit about CoreData and I haven't been able to find any good resources for just manually connecting to the database. I'm looking for recommendations.

我应该尝试CoreData,如果是这样,任何人都可以推荐一个新的语言的人的好教程?或者,我应该尝试手动连接和查询SQLite数据库不知何故,如果是这样,任何教程?

Should I try CoreData, and if so, can anyone recommend a good tutorial for someone new to the language? Or, should I try to manually connect and query an SQLite database somehow, and, if so, any tutorials? Any help would be greatly appreciated!

谢谢!

推荐答案

超出真棒的 FMDB 。它是一个围绕C SQLite API的Objective-C包装,使得在Cocoa中处理SQLite数据库真的很容易。

Check out the supremely awesome FMDB. It's an Objective-C wrapper around the C SQLite API and makes it really really easy to deal with SQLite databases in Cocoa.

哦,它带有一些文档示例代码是很容易理解和正式评论。有可能是,你想用SQLite数据库做任何事情的99%在示例中演示。

Oh, and it comes with some documentation and the sample code is pretty easy to understand and is decently commented. Chances are that 99% of anything you'd want to do with a SQLite database are demonstrated in the example.

在我看来,如果你使用任何其他的访问SQLite数据库(这不是一个CoreData存储),你做错了。

In my opinion, if you use anything else to access a SQLite database (that's not a CoreData store), you're doing it wrong.

这篇关于想要一个简单的概述如何连接到一个SQLite数据库在Cocoa / Objective-C的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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