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?
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?
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):
create table exif_info (
photo_id integer,
name varchar,
value varchar
);
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.
For your second question...
Picasa
Flickr
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.
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.