English 中文(简体)
Base64 Encoded Data -DB or filesystem
原标题:Base64 Encoded Data - DB or Filesystem

我有一个新方案,将产生大量被编码的视听数据。 这一数据将以XML的形式通过吉大港山区开发计划提供,基地64的数据将上网。 这些档案很有可能会打破20个元数据。 直接从档案系统为这些档案服务,或者把数据储存在MySQL数据库是否可行? 每项数据都将建立起来,但总体而言是不必要的,因为这些数据很可能在数据建立和送达之后不久即得到净化。

i 知道,在大多数情况下,在非行储存双元数据是多余的,但因为所有数据都是属性数据,我希望看到共识是什么。 从现在起,由于效率原因,我倾向于将其储存在档案系统中,但如果有可能将其储存在数据库中,那么管理数据将更加容易。

最佳回答

你们需要权衡几个因素:

  • www.un.org/Depts/DGACM/index_spanish.htm 进出速度<> 如果你把所有档案存放在档案系统中,那么一些档案系统在你拥有太多的档案时便会中断或放慢。 我看到了解决这一问题的许多不同的目录分配办法。

  • <<>Compression 我的SQL可以轻易压缩你储存的数据。 有了档案系统,压缩数据可能更困难。 利用任何压缩压缩压缩机,也引起对服务器上的邮联速度的关切。

  • http://www.ohchr.org。 简便的备份/备份,对档案系统而言之容易或困难程度大不相同。 如果你在档案系统中有数据支持/逮捕,那么,使你的备份/复读更加复杂,在危机中复杂。

  • Data loss tolerance With a DB you manipulate a record and all data is there in the same place. If you save your data to a file, you need to manipulate the associated file with extra code, and this this introduces another place to have bugs and possible data loss. More specifically, if you store part of the record in the filesystem and the rest in the DB, you need to go to great lengths to maintain transactional integrity. Nobody cares about this until you lose data, so pay attention to this aspect even though it may not seem important.

  • <><>Replication> 如果你只需要一个级别来处理复制问题,则更容易处理。 仅仅在非行输入你的数据,然后仅复制非行数据,对非行和档案系统来说,比照。

  • Cumbersomeness It is just more cumbersome to deal with larger DB backups than it is with smaller DB backups.

这些是引起人们注意的首要问题。 我试图不提倡这两种解决办法,这实际上在很大程度上取决于你所谈论的哪一种档案系统,而且由于这一点没有具体指明,你必须作出这一决定。

问题回答

First, you can store any bytes you like in a database (using appropriate "blob" types). Databases do not need to contain character-only data.

其次,将基64编码数据储存在磁盘或数据库中是浪费空间(具体说是占你的面积的25%)。 actual bytes, 然后将64-encode the bytes on the way out of the HTTP服务器。

If your purging policy is as short as you indicate, you may be better off not storing the data anywhere at all, and generating it on demand every time it is needed. That way, it s impossible to have any problems with your caching layer, because there isn t one.





相关问题
what is wrong with this mysql code

$db_user="root"; $db_host="localhost"; $db_password="root"; $db_name = "fayer"; $conn = mysqli_connect($db_host,$db_user,$db_password,$db_name) or die ("couldn t connect to server"); // perform query ...

Users asking for denormalized database

I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...

Easiest way to deal with sample data in Java web apps?

I m writing a Java web app in my free time to learn more about development. I m using the Stripes framework and eventually intend to use hibernate and MySQL For the moment, whilst creating the pages ...

join across databases with nhibernate

I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...

How can I know if such value exists in database? (ADO.NET)

For example, I have a table, and there is a column named Tags . I want to know if value programming exists in this column. How can I do this in ADO.NET? I did this: OleDbCommand cmd = new ...

Convert date to string upon saving a doctrine record

I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...

热门标签