Table of contents

Database schema

F-Spot database is quite simple (right now), but since many are requesting and maybe will be helpful in the future, show here you'll find table schema explaination. The db is an Sqlite v3 (v2 is not working at the moment. See bug#467011 (http://bugzilla.gnome.org/show_bug.cgi?id=467011) for more information on v2). The default location of the db is ~/.gnome2/f-spot/photos.db. Backup it if you plan to make tests!

This documentation is referred to database version 10, as used by F-Spot 0.4.1.

Export table

This table holds the log of the export operations performed on photos.

Field name Meaning
id Progressive ID
image_id Image ID on the photos table
version_id Version id on the photo_versions table
export_type Name of the exported service
export_token Uri or service id of the exported item

Jobs table

This table holds the background jobs to be executed.

Field name Meaning
id Unique progressive ID
job_type missing
job_options missing
run_at missing
job_priority missing

Meta table

This table holds some internal variables for F-Spot, like db version, F-Spot version, Hidden tag id.

Field name Meaning
id Progressive ID
name Property name
data Property value

Photo_tags table

This table holds the association of tags to photos.

Field name Meaning
photo_id Photo ID on the photos table
tag_id Tag ID on the tags table

Photo_versions table

This table holds the additional versions of a picture.

Field name Meaning
photo_id Photo ID on the photos table
version_id Version ID
name Version name
uri URI location of the version
protected Boolean flag for protecting version

Photos table

This table holds the photos.

Field name Meaning
id Photo ID
time Photo original time (unix timestamp)
uri URI location of the photo
description Photo description
roll_id Import roll ID in the rolls table
default_version_id Default version to be displayed. If 0 is original, otherwise links to photo_versions table


Rolls table

This table holds the list of the import rolls.

Field name Meaning
id Progressive ID
time Unix timestamp of the import roll


Tags table

This table holds the list of available tags.

Field name Meaning
id Progressive ID
name Tag name. Must be unique in the db
category_id Tag id of the parent tag, if any
is_category Boolean value, true if the tag is a toplevel one
sort_priority missing
icon Tag icon. Can be null, pixbuf or a text referring to a stock Gnome icon
Retrieved from "http://f-spot.org/Database"

This page was last modified 16:34, 7 Jan 2008. This page has been accessed 1099 times.