Methods for storing metadata associated with individual files?

后端 未结 5 2080
太阳男子
太阳男子 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:31

    One option might be a relational database, structured like this:

    FILE
    f_id
    f_location
    f_title
    f_description
    
    ATTRIBUTE
    a_id
    a_label
    
    VALUE
    v_id
    v_label
    
    METADATA
    md_file
    md_attribute
    md_value
    

    This implementation has some unique information (title/description), but is primarily targetted at repetitive groups of data.

    For some requirements, other less generic tables may be more useful.


    This has advantages of this being that relational databases are very common, and obviously very good at handling relationships and storing lots of data.

    However, for some uses a database server brings an overhead which might not be desirable. Also, the database server is distinct from the files - they do not sit together, and require different methods of interaction.

    Databases do not (easily) sit under version control - which may be a good or bad thing, depending on your point of view and specific needs.

提交回复
热议问题