User Tools

Site Tools


podoc:view_photo_sql_view

Database View Description of "view_photo"

Name

view_photo

Description

Purpose

Schema

CREATE VIEW view_photo AS
  SELECT photo.identifier, caption, users, date_of_exposure, photo_dupe.date_of_creation,
         storage_location, storage_index,
         photo_version.small_image_path, photo_version.medium_image_path, photo_version.large_image_path,
         folder, (access_type.VALUE) AS access_rights
    FROM photo, photo_dupe, photo_version, access_type
   WHERE photo.identifier = photo_version.photo
     AND photo.identifier = photo_dupe.photo
     AND photo.access_rights = access_type.identifier
   ORDER BY photo.identifier;

History

Used first

Version 2.5

Used last

Still in use

Change history

= Version 2.5 =

CREATE VIEW view_photo AS
  SELECT photo.identifier, caption, users, date_of_exposure, date_of_creation,
         storage_location, storage_index, small_image_path, medium_image_path,
         large_image_path, folder, (access_type.VALUE) AS access_rights
    FROM photo, photo_dupe, access_type
   WHERE photo.identifier = photo_dupe.photo
     AND photo.access_rights = access_type.identifier
   ORDER BY photo.identifier;

= Version 2.7 ==

DROP VIEW view_photo;
 
CREATE VIEW view_photo AS
  SELECT photo.identifier, caption, users, date_of_exposure, photo_dupe.date_of_creation,
         storage_location, storage_index,
         photo_version.small_image_path, photo_version.medium_image_path, photo_version.large_image_path,
         folder, (access_type.VALUE) AS access_rights
    FROM photo, photo_dupe, photo_version, access_type
   WHERE photo.identifier = photo_version.photo
     AND photo.identifier = photo_dupe.photo
     AND photo.access_rights = access_type.identifier
   ORDER BY photo.identifier;
podoc/view_photo_sql_view.txt · Last modified: 2007/04/20 12:17 by Luud