需要保存大量的记录,我的应用程序?我应该使用本地数据库instad? [英] Need to save a lot of records for my application... should I use a local database instad?

查看:164
本文介绍了需要保存大量的记录,我的应用程序?我应该使用本地数据库instad?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要开始开发一个时间机器的窗口。我需要存储大量的记录在表中。我每次执行备份,我会写50,000条记录,因为这是我有多少个文件在我的电脑(每个记录无关,与存储的文件。该记录将包含每个文件所在的路径),反正我不知道如果我可以使用XML来存储我的记录,因为我的查询不会是复杂的,再加上它更易于部署与建立一个本地数据库,在那里,我不知道这是否将是更有效,因为即使查询都将是简单的,我将要处理大量的数据。此外,我不知道,如果一个本地数据库可以是大于2GB,我估计,该数据库将是约3 GB,如果经常使用一年。

I am about to start developing a "time machine" for windows. I need to store a lot of records in a table. Every time I perform a backup I will write about 50,000 records because that's how many files I have in my computer (each records has nothing to do with storing a file. the record will contain the path where each file is located) Anyways I don't know if I could use XML to store my records since my queries are not going to be complicated plus it is easier to deploy versus creating a local database where I don't know if it is going to be more efficient because even though the queries are going to be simple I am going to be dealing with a lot of data. Moreover, I don't know if a local database can be bigger than 2GB and I am estimating that the database is going to be about 3 GB if regularly used for a year.

我preFER使用XML和使用XPath做查询,这使它更容易部署我的应用程序。但是,如果创建一个本地数据库被证明是更有效和XML是要慢,我的应用程序,因为我有这么多条记录,然后我将创建一个本地数据库来代替。任何其他的建议将是有益的,也许我需要做些别的事情。

I prefer to use XML and use Xpath to do queries making it easier to deploy my application. But if creating a local database turns out to be more efficient and XML is going to slow my application because I have so many records then I will create a local database instead. Any other recommendations will be helpful maybe I need to do something else.

推荐答案

看看的SQLite

这是嵌但功能强大的数据库。你并不需要安装SQL Server实例。
你可以把这个数据库与特定API的文件。 API允许你对这个文件运行SQL查询。

This is embedded yet powerful database. You don't need to install SQL server instance.
You can think of this database as a file with certain API. API allows you to run SQL queries against this file.

这篇关于需要保存大量的记录,我的应用程序?我应该使用本地数据库instad?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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