Database Table Description of "location"

Name

location

Description

Purpose

Schema

CREATE TABLE location ( -- location is the place the photo was taken
  identifier            integer NOT NULL PRIMARY KEY,
  place                 varchar(300),
  state                 integer REFERENCES state(identifier),
  country               integer REFERENCES country(identifier),
  last_modified_date 	timestamp,
  users                 integer REFERENCES users(identifier),
  city                  varchar(300),
  latitude              varchar(10),
  longitude             varchar(10),
  private               BOOLEAN NOT NULL
);

References tables

  • country references country(identifier)
  • state references state(identifier)
  • users references users(identifier)

Is referenced by tables

  • photo(location) references identifier

Related sequences

Related indexes

None.

Related functions

Related views

History

Used first

Version 2.5

Used last

Still in use

Schema change history

= Version 2.5 =

CREATE TABLE location ( -- location is the place the photo was taken
  identifier            integer NOT NULL PRIMARY KEY,
  place                 varchar(300),
  state                 integer REFERENCES state(identifier),
  country               integer REFERENCES country(identifier),
  last_modified_date 	timestamp,
  last_modifying_users  integer REFERENCES users(identifier),
  city                  varchar(300),
  latitude              varchar(10),
  longitude             varchar(10)
);

= Version 2.33 =

ALTER TABLE location RENAME last_modifying_users TO users;
 
ALTER TABLE location ADD private BOOLEAN;
UPDATE location SET private='f';
ALTER TABLE location ALTER private SET NOT NULL;
Data change history

= Version 2.31 =

-- Ensure referential integrity with the locations.
INSERT INTO location (identifier, place) VALUES (0, 'Unknown');
podoc/location_sql_table.txt · Last modified: 2007/04/20 09:38 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