在数据库中存储 EXIF 信息
将照片中的 EXIF 数据存储在数据库(在我的例子中为 MySQL)中的最佳方法是什么? 这是一个照片共享网站。
什么是最重要的标签,什么是可以丢弃的?
What's the best way to store EXIF data from photos in a Database (MySQL in my case). This is for a photo sharing site.
What are the most important Tags, and what are discardable?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我们很难确定什么对您来说是重要的。。 一种方法可能是将所有属性存储在创建的表中(近似 SQL 语法):
此表中的每一行将一个 EXIF 属性与一个 照片相关联。 因此,您需要一大堆行来保存单张照片的所有 EXIF 属性,但这正是关系数据库所擅长的。
通过这种方式,您可以存储所有可用信息,而不必现在决定以后可能重要的信息。
It's hard for us to determine what is important for you. One approach might be to store all the properties in a table created something like this (approximate SQL syntax):
Each row in this table associates one EXIF property with one photo. So you would need a whole bunch of rows to hold all the EXIF properties for a single photo, but this is exactly what relational databases are good at.
In this way, you can store all the available information without having to decide now what might be important later.
对于你的第二个问题...
Picasa
Flickr
For your second question...
Picasa
Flickr
实际上,我建议将 EXIF 存储为 blob(json?),因为生成 EXIF 的设备之间存在很大差异。 将其作为卡盘拉动然后对其进行操作可能会更容易。
如果这是一个照片共享网站,您可能也想以相同的方式存储 IPTC 信息。
请参阅 https://web.archive.org/web/20100728012813/http://web.archive.org/web/20100728012813/http:// /bret.appspot.com/entry/how-friendfeed-uses-mysql
Actually, I would recommend storing EXIF as a blob (json?) since there is great variability across devices that generate EXIF. It may be easier to pull that as a chuck and then operate on it.
If this is for a photo sharing site, you probably want to store the IPTC info too, probably in the same manner.
See https://web.archive.org/web/20100728012813/http://bret.appspot.com/entry/how-friendfeed-uses-mysql
EXIF 是元数据。 为什么不使用从头开始设计的数据格式来处理元数据? EXIF 可以轻松放入 RDF 中,其中有大量工具、库和存储选项。
EXIF is metadata. Why not use a data format designed from the ground up to deal with metadata? EXIF could be easily put into RDF, which has tons of tools, libraries and storage options.