Methods for storing metadata associated with individual files?

后端 未结 5 2103
太阳男子
太阳男子 2020-12-31 16:02

Given a collection of files which will have associated metadata, what are the recommended methods for storing this metadata?

Some files formats support storing metad

5条回答
  •  情话喂你
    2020-12-31 16:24

    Plain text has some obvious advantages over anything else. Something like

    FileName = 'ferrari.gif'
    Title = 'My brand new car'
    Tags = 'cars', 'cool'
    Related = 'michaelknight.mp3'
    

    Picasa's Picasa.ini files are a good example for this kind of metadata. Also, instead of inventing your own format, XML might be worth considering. There are plenty of readily available DOM processors to deal with this format.

    Then again, if the amount of files and relations between them is huge, databases may be better.

提交回复
热议问题