User Tools

Site Tools


podoc:aperture_sql_table

Database Table Description of "aperture"

Name

aperture

Description

This table contains a list of all valid apertures (eg f/2, f/5.6, etc).

Purpose

To enforce referential integrity.

Note: This table will likely be eliminated in the future in favor of direct aperture representation – this is an unnecessary abstraction.

Schema

CREATE TABLE aperture (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  VALUE                 VARCHAR(10)
); 

References tables

None.

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 aperture (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  VALUE                 NUMERIC
);

= Version 2.32 =

-- Convert aperture from a varchar to a numeric type
ALTER TABLE aperture ADD value_num NUMERIC;
UPDATE aperture SET value_num = VALUE::text::NUMERIC;
ALTER TABLE aperture DROP VALUE;
ALTER TABLE aperture RENAME value_num TO VALUE;
Data change history

= Version 2.5 =

INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '0.5');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '0.75');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '1.0');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '1.2');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '1.3');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '1.4');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '1.6');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '1.8');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '2.0');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '2.2');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '2.5');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '2.8');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '3.2');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '3.5');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '4.0');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '4.5');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '5.0');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '5.6');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '6.3');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '7.1');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '8.0');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '9.0');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '10');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '11');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '13');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '14');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '16');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '18');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '20');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '22');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '25');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '28');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '32');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '36');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '40');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '45');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '51');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '57');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '64');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '72');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '81');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '90');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '103');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '115');
INSERT INTO aperture VALUES (NEXTVAL('aperture_id_sequence'), '128');
podoc/aperture_sql_table.txt · Last modified: 2007/04/20 10:22 by Luud