English 中文(简体)
如何组织大量物体
原标题:How to organize a large number of objects
  • 时间:2010-04-29 02:35:38
  •  标签:
  • file

我们拥有大量与这些文件有关的文件和元数据。 如何最好地组织这些建议?

目前,我们建立了司级:

/repository/category/date(when they were loaded into our db)/document_number.pdf and .xml

We use the path as a unique identifier for the document in our system. Having a flat structure doesn t seem to a good option. Also using the path as an id helps to keep our data independent from our database/application logic, so we can reload them easily in case of failure, and all documents will maintain their old ids. Yet, it introduces some limitations. for example we can t move the files once they ve been placed in this structure, also it takes work to put them this way. What is the best practice? How websites such as Scribd deal with this problem?

问题回答

你的做法似乎并不不合理,但如果你在一天之内拿到几千多份文件的话,你就会遭受痛苦(档案系统往往不能很好地处理目录中的大量文件)。

将xml文件放在......pdf的旁边看似乎是个奇怪之处——如果它真的是关于该文件的元数据,它是否不在数据库中(它像你已经掌握的)可以很容易地查询和索引等?

在储存大量档案时,我通常会把档案钥匙(例如,URL) taken掉,然后根据散射的头特性将其X级储存在目录中。

Say Youstart with the key • 如何组织大量的物体。 m5 因此,你可以将其储存在......

Base_dir/0/a/7/4/http_stackoverflow.com_questions_2734454_how-to-organize-a-large- number-of-objects

或者,鉴于你开始的关键,你可以轻易找到的东西。

这种做法比你的日期更有利,因为它可以扩大规模,用于处理大量文件(甚至每天),而没有任何名录过于庞大,但另一方面,对于不得不人工找到特定档案的人来说,这种方式却不那么直观。





相关问题
How can I load a folders files into a ListView?

I d like to have a user select a folder with the FolderBrowserDialog and have the files loaded into the ListView. My intention is to make a little playlist of sorts so I have to modify a couple of ...

File Handling Issue

I am developing a tool in c#, at one instance I start writing into a xml file continuously using my tool,when i suddenly restart my machine the particular xml file gets corrupted, what is the reason ...

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Saving output of a for-loop to file

I have opened a file with blast results and printed out the hits in fasta format to the screen. The code looks like this: result_handle = open("/Users/jonbra/Desktop/my_blast.xml") from Bio.Blast ...

热门标签