Database Table Description of "focal_length"

Name

focal_length

Description

Purpose

Schema

CREATE TABLE focal_length (
  identifier            integer NOT NULL PRIMARY KEY,
  value                 integer
);

References tables

None.

Is referenced by tables

  • lens_type(max_focal_length) references identifier
  • lens_type(min_focal_length) references identifier
  • photo_tech(focal_length) references identifier

Related sequences

Related indexes

None.

Related functions

None.

Related views

History

Used first

Version 2.5

Used last

Still in use

Schema change history

= Version 2.5 =

CREATE TABLE focal_length (
  identifier            integer NOT NULL PRIMARY KEY,
  value                 varchar(10)
);

= Version 2.32 =

-- Convert focal length from a varchar to an integer
ALTER TABLE focal_length ADD value_num integer;
UPDATE focal_length SET value_num = value::text::integer;
ALTER TABLE focal_length DROP value;
ALTER TABLE focal_length RENAME value_num TO value;
Data change history

= Version 2.5 =

INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '5');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '6');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '7');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '8');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '9');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '10');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '11');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '12');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '13');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '14');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '15');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '16');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '17');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '18');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '19');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '20');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '24');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '28');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '35');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '40');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '45');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '50');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '55');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '60');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '70');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '80');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '85');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '90');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '105');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '120');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '135');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '150');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '180');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '200');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '210');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '300');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '400');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '500');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '600');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '800');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1000');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1100');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1200');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '1300');
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), '2000');

= Version 2.32 =

-- Add more focal lengths.
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 75);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 240);

= Version 2.33 =

-- Add more focal lengths.
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 65);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 95);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 100);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 110);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 115);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 125);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 130);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 140);
INSERT INTO focal_length VALUES (NEXTVAL('focal_length_id_sequence'), 145);
podoc/focal_length_sql_table.txt · Last modified: 2007/04/20 10:27 by Luud
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0