English 中文(简体)
信息交换数据库
原标题:Clearing Application database

我有一份使用qlite数据库的“灯塔”应用程序,储存特定用户的文字数据。 数据从数据库中读/写,从每秒一秒后定期运行的服务处读/写。 我要求根据年龄确定数据。 同样,如果档案超过24小时,则应删除。

核对档案的账龄似乎比较容易,而现在的时间与文件制作时间比较。 问题是:

  1. 我在什么地方进行这种检查并删除档案;在Create()申请中,或在用户记录/记录中填写时? 什么是促使这种逻辑偏离的理想场所? 在用户记录中,我是否应当安排一个小数?

  2. 我是否应当删除档案,或者只是删除行文? 如果我不从记录/记录中触发Cache清除逻辑,那么就赢得删除档案的问题,特别是如果该处仍在试图从数据库读写的话?

请提出咨询意见。

感谢。

最佳回答

这完全取决于你对第二部分申请的逻辑。 我不明白,为什么你会删除一个数据库,除非它只是用来储存无关的温室数据。 无论是进行这种检查和删除的理想地点,还是向数据库开放链接的数据检索类别。 下面是我的逻辑......

  1. Call to open DB
  2. Check if DB file is old
  3. If yes, delete it
  4. Open Database (should create one if it does not exist)
问题回答

暂无回答




相关问题
Write-though caching of large data sets in WCF?

We ve got a smart client that talks to a SQL Server database via WCF, displaying the entities in the database, and allowing the user to edit those entities. Some of the WCF calls return a large data ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

how to tell clicking "back" to load cache?

I would like for my site when someone clicks "Back" or "Forward" for the server to tell the browser to load the cache instead of reloading the entire page. I ve tested some headers and done research, ...

java plugin cache and dynamic IP host

I m trying to use Amazon S3 and Amazon Cloudfront CDN to deliver the jar files of my applet application. I m seeing several cache misses of my jars by the java plugin. This is a show-stopper for me, ...

Frequently Used metadata Hashmap

Are there any implementations of a static size hashtable that limits the entries to either the most recently or most frequently used metadata? I would prefer not to keep track of this information ...

PHP - Memcache - HTML Caching

I would like to create a caching system that will bypass some mechanisms in order to improve the performance. I have some examples: 1-) I have a dynamic PHP page that is updated every hour. The page ...

Performance of Sql subqueriesfunctions

I am currently working on a particularly complex use-case. Simplifying below :) First, a client record has a many-to-one relationship with a collection of services, that is, a single client may have ...

热门标签