Windows 8 应用程序的嵌入式数据库 [英] Embedded database for windows 8 app

查看:44
本文介绍了Windows 8 应用程序的嵌入式数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于 Windows 8 应用程序开发的任何类型的可嵌入数据库?

Is there any kind of embed-able database for windows 8 app development?

我正在寻找与 Visual Studio 11 集成的 Sqlite 或其他类似的东西.

I was looking for something like Sqlite or etc which integrate with visual studio 11.

推荐答案

对于 JavaScript,您可能最好只使用 HTML5 IndexedDB.不幸的是,这不能直接用于其他语言.

For JavaScript, you're probably best off just using HTML5 IndexedDB. Unfortunately, that is not directly available to other languages.

还有第二个选项:Windows 有一个集成的嵌入式数据库,形式为 可扩展存储引擎.它是一个相对简单的 ISAM DB(没有 SQL,您需要直接查询索引).它是 Metro 应用程序的白名单 API.在 C++ 中使用它很简单 - 只需 #include 并继续.对于 C#,您需要使用 P/Invoke.对于 JavaScript,您需要使用 C++/CX 围绕 ESE API 编写包装器.

There is a stock second option: Windows has an integrated embedded database in form of Extensible Storage Engine. It's a relatively simple ISAM DB (no SQL, you need to query indices directly). It is a whitelisted API for Metro applications. Using it from C++ is straightforward - just #include <esent.h> and go ahead. For C#, you'll need to use P/Invoke. For JavaScript, you'll need to write a wrapper around ESE API using C++/CX.

另一种选择是采用 SQLite 并使其为 WinRT 编译(并通过应用程序对被禁止的 API 的认证检查).您需要对代码进行一些调整才能使其正常工作,但数量不多.

Yet another option is to take SQLite and make it compile (and pass app certification check for banned APIs) for WinRT. You'll need to make some tweaks to the code to get it to work, but there aren't many.

这篇关于Windows 8 应用程序的嵌入式数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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