Home | Christian Missions |
Christustreff Marburg |
Pictures of Marburg |
Job | Remote Communications |
Linux OS | Psion page |
Contact
Ideas for a Photo Database
This is just a collection of ideas, which will hopefully at some time
evolve into a documentation.
Reason
I recently bought a digital camera. This nice machine creates lots of more
or less (depending on the operator's skills) nice pictures, which have
slightly descriptive filenames such as mvc-022f.jpg.
I'd like to have a method of enhancing the usefulness of these pictures by
adding pieces of information, such as
- date and time the picture was taken
- location (country, city, street)
- depicted people
- contents comments, such as what I wanted to express or explain
- technical comments, such as what settings I used to take the shot
Data Structure
Relational database (probably MySQL or PostgreSQL), with web-interface
(probably using PHP).
Main tables:
Table pictures
One row for each picture.
- p_id: artificial primary index
- p_datetime: date and time the picture was taken
- p_filename_full: filename of the full sized, edited version of the
picture, relative to some picture storage base directory
- p_filename_thumb: filename of a thumbnail version of the picture
- p_filename_raw: filename of the original, unedited version of the
picture, as it came out of the camera
- p_comment_cont: free text (html?) for the contents comment, e.g.
what I wanted to emphasize or express or explain.
- p_comment_tech: free text (html?) for the technical comment, e.g.
which camera settings I used or which postprocessing I applied.
- p_orientation: degrees (0,90,180,270) of clockwise rotation of the raw
image that is needed to show the upside up.
There is no keyword field, because that's going to be done by
categories.
Table piccat
One or more rows for each picture: one for each category, a picture is
member of. Intended as a structured replacement of a keyword field.
- pc_id: artificial primary index (perhaps not necessary)
- pc_p_id: ID of the picture that is being described by this record
- pc_c_id: ID of the category that is being related to the picture
- pc_importance: number (1-10), specifying the importance of this category
within all categories of this picture, e.g. if you took a picture of your
friend and by chance another person is in the background, your friend's
category would get importance 10 and the other person's category would get
importance 3 or so. Leaving this field empty results in 0, which is a
pretty low importance, but probably o.k. for most purposes.
- pc_sequence: number (something like 1-1000), specifying the sequence of
this picture within this category. Useful e.g. to specify a sequence of
pictures in albums (which of course can also be specified as a
category).
- pc_explanation: optional free text, explaining why/how the
picture belongs to this category, e.g. where in the picture the person
(who is represented by the category) can be found
- pc_detail: optional free text, describing a possible subcategory,
this picture would belong to. Designed for preparing growth of category
trees. E.g. if you just have a category Places/Marburg, you could enter
"Castle" here. Later, if you collect so many pictures of the Marburg
castle that you want to create a subcategory, this field will help you to
identifiy which pictures to move.
- pc_comment: free text, possibly
Table categories
One row for each category. There can be hierarchical sub-categories, e.g.
"People/Family/Aunt Jamie" or "Places/Marburg/Castle" or "Events/Holiday 2001"
or maybe just "Flowers". Because any single picture can be a member of many
categories, you can be quite specific in the categories without risking
ambiguities - those can be resolved by placing the picture into multiple
categories.
- c_id: artificial primary index
- c_name: short (e.g. 30 characters) text field, giving a name of that
category (only "Aunt Jamie", not "People/Family/Aunt Jamie"). Required
field.
- c_path: calculated field, containing the full pathname of this category
(not just "Aunt Jamie", but "People/Family/Aunt Jamie").
- c_parent_id: ID of the parent category, i.e. c_id is a sub-category of
c_parent_id. 0 means "this is a root category". NULL is not a permitted
value.
- c_definition: free text, giving a definition of the category,
designed to help people that have to associate pictures with
categories.
User Interface
To enable networking and eliminate the need of installing client software,
I plan to use a web interface. Probably these forms will be needed:
- picture list, based on a selection, e.g. a list p_id's, of table
pictures. Probably one table row per picture, Date/time as text,
categories just as textual links, only the thumbnail visible (but with a
link to p_filename_full), contents comment in a small font. Link to "edit
picture information"
- single picture: all data of one record of table picture. Only thumbnail
image shown, but link to p_filename_full, all 3 filenames shown with a
link to the respective images. List of categories (one in a row), buttons
to add/modify/delete a category or delete the entire picture.
- browse by category: one pager per category, showing the list of links to
supercategories, the list of links to subcategories and a picture list of
all pictures right in this category.
- List of categories: one page with all categories, arranged
hierachically, by cname.
- single category: similar to "browse by category", but capable of
modifying this category, e.g. changing the name of the parent
category.
Something special will be needed for a quick (otherwise the system will not
be used) entry of the association of pictures with categories. Perhaps
something with frames will be needed, specifying the current picture ID in the
URI of the categories frame and the current category ID in the URI of the
picture frame. The alternative would be to use cookies, which aren't my
favourite style element.
Special Functions
Home | Christian Missions |
Christustreff Marburg |
Pictures of Marburg |
Job | Remote Communications |
Linux OS | Psion page |
Contact
Last updated: 05.05.2007 17:43:19
Martin Stut, email: , Marburg, Germany
URL: http://www.stut.de/photodb.html