“基于数据写入”题 [英] "writing data based" question

查看:53
本文介绍了“基于数据写入”题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何用记事本写数据库???例如,我如何在其上写一个表

how can I write data base with notepad??? for example how can i write a table on it

推荐答案

可以使用任何形式的数据库 - 但它通常不是与使用适当的文件格式一样成功。使用文本文件存储数据存在许多问题:文本文件没有内在组织。有一条松散的规则,换行符(无论在特定系统上是什么,它确实有所不同)都会结束行,但没有基于行的组织,因此在行中添加或删除单个字符意味着从那一点开始重写整个文件。这使得基于文本文件的数据库(例如XML或CSV)在编写一些小的更改时非常低效。



如果你修复了行或行比您可以将文本文件用作基本数据库,但即使这样,您还需要考虑许多其他因素:删除记录和重用空间,多用户访问的困难等等。 br $> b $ b

在实践中,它通常是不值得的:现在系统中内置了许多简单的解决方案,这些解决方案使您的生活变得更加轻松。我会看看你想要存储什么样的数据,以及你想用它做什么,并且可能使用现有的格式化系统而不是滚动你自己的。
You can use anything as a database of some form - but it is not generally as successful as using a "proper" file format. There are a number of problems with using text files to store data: text files have no intrinsic organisation. There is a loose "rule" that a newline character (whatever that is on the particular system, and it does vary) ends a "line" but there is no line-based organisation, so adding or removing a single character to a line means rewriting the entire file from that point on. This makes text file based databases (such as XML, or CSV for example) very inefficient when writing a number of small changes.

If you fix the length of your "lines" or "rows" than you can use a text file as a primitive database, but even then you need to consider a lot of other factors: deleting records and reusing the spaces, the difficulties of multi user access, and so forth.

In practice, it generally isn't worth the effort: there are a lot of simple solutions built into systems nowadays which make your life a lot, lot easier. I'd look at what kind of data you want to store, and what you want to do with it, and probably use an existing formatted system instead of "rolling your own".


这篇关于“基于数据写入”题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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