User Tools

Site Tools


podoc:photo_tech_sql_table

Database Table Description of "photo_tech"

Name

photo_tech

Description

Purpose

Schema

CREATE TABLE photo_tech (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  photo                 INTEGER NOT NULL REFERENCES photo(identifier),
  camera                INTEGER REFERENCES camera(identifier),
  lens                  INTEGER REFERENCES lens(identifier),
  film                  INTEGER REFERENCES film(identifier),
  flash                 INTEGER REFERENCES flash(identifier),
  scanner               INTEGER REFERENCES scanner(identifier),
  FILTER                INTEGER REFERENCES FILTER(identifier),
  scan_resolution       INTEGER REFERENCES scan_resolution(identifier),
  aperture              INTEGER REFERENCES aperture(identifier),        -- key from aperture, must be within the lens limits
  focal_length          INTEGER REFERENCES focal_length(identifier),    -- key from focal length, must be within the lens limits
  shutter               INTEGER REFERENCES shutter(identifier),
  camera_metering       INTEGER REFERENCES camera_metering(identifier),
  camera_program        INTEGER REFERENCES camera_program(identifier),
  flash_mode            INTEGER REFERENCES flash_mode(identifier),
  exposure_comp         INTEGER REFERENCES ev_comp(identifier),
  flash_comp            INTEGER REFERENCES ev_comp(identifier),
  ev_difference         INTEGER REFERENCES ev_comp(identifier),
  iso_override          INTEGER REFERENCES film_iso(identifier),
  support               INTEGER REFERENCES support(identifier),
  scan_bitdepth         INTEGER REFERENCES scan_bitdepth(identifier),
  scan_multiscan        INTEGER REFERENCES scan_multiscan(identifier),
  exif                  text,
  iptc                  text,
  latitude              NUMERIC,                                        -- GPS information...
  longitude             NUMERIC,
  altitude              NUMERIC,
  img_direction         NUMERIC,
  rdf                   text
);

References tables

Is referenced by tables

None.

None.

History

Used first

Version 2.5

Used last

Still in use

Schema change history

= Version 2.5 =

CREATE TABLE photo_tech (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  photo                 INTEGER NOT NULL REFERENCES photo(identifier),
  camera                INTEGER REFERENCES camera(identifier),
  lens                  INTEGER REFERENCES lens(identifier),
  film                  INTEGER REFERENCES film(identifier),
  flash                 INTEGER REFERENCES flash(identifier),
  scanner               INTEGER REFERENCES scanner(identifier),
  FILTER                INTEGER REFERENCES FILTER(identifier),
  scan_resolution       INTEGER REFERENCES scan_resolution(identifier),
  aperture              INTEGER REFERENCES aperture(identifier),        -- key from aperture, must be within the lens limits
  focal_length          INTEGER REFERENCES focal_length(identifier),    -- key from focal length, must be within the lens limits
  shutter               INTEGER REFERENCES shutter(identifier),
  camera_metering       INTEGER REFERENCES camera_metering(identifier),
  camera_program        INTEGER REFERENCES camera_program(identifier),
  flash_mode            INTEGER REFERENCES flash_mode(identifier),
  exposure_comp         INTEGER REFERENCES ev_comp(identifier),
  flash_comp            INTEGER REFERENCES ev_comp(identifier),
  ev_difference         INTEGER REFERENCES ev_comp(identifier),
  iso_override          INTEGER REFERENCES film_iso(identifier),
  support               INTEGER REFERENCES support(identifier),
  scan_bitdepth         INTEGER REFERENCES scan_bitdepth(identifier),
  scan_multiscan        INTEGER REFERENCES scan_multiscan(identifier)
);

= Version 2.9 =

ALTER TABLE photo_tech ADD COLUMN exif text;
ALTER TABLE photo_tech ADD COLUMN iptc text;

= Version 2.34 =

-- GPS information...
ALTER TABLE photo_tech ADD latitude NUMERIC;
ALTER TABLE photo_tech ADD longitude NUMERIC;
ALTER TABLE photo_tech ADD altitude NUMERIC;
ALTER TABLE photo_tech ADD img_direction NUMERIC;
-- Add an 'rdf' column to store all XMP data.
ALTER TABLE photo_tech ADD rdf text;
Data change history

= Version 2.6 =

-- shift all existing ev comensation references
UPDATE photo_tech SET exposure_comp=exposure_comp+4 WHERE exposure_comp >21;
UPDATE photo_tech SET flash_comp=flash_comp+4 WHERE flash_comp >21;
UPDATE photo_tech SET ev_difference=ev_difference+4 WHERE ev_difference >21;
podoc/photo_tech_sql_table.txt · Last modified: 2007/10/19 16:31 by Luud