User Tools

Site Tools


podoc:camera_sql_table

This is an old revision of the document!


Database Table Description of "camera"

Name

camera

Description

A listing of all *specific* cameras that the users owns, complete with serial number. A camera can be associated with a photo.

Purpose

A user should be able to keep track of their cameras.

Schema

CREATE TABLE camera (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  TYPE                  INTEGER REFERENCES camera_type(identifier),
  users                 INTEGER REFERENCES users(identifier),
  serial_number         VARCHAR(20),
  date_of_purchase      TIMESTAMP,
  purchased_new         CHAR(1) CHECK (purchased_new IN ('t', 'f')),
  access_rights         INTEGER NOT NULL REFERENCES access_type(identifier)
);

References tables

Is referenced by tables

None.

History

Used first

Version 2.5

Used last

Still in use

Change history

= Version 2.5 =

CREATE TABLE camera (
  identifier            INTEGER NOT NULL PRIMARY KEY,
  TYPE                  INTEGER REFERENCES camera_type(identifier),
  users                 INTEGER REFERENCES users(identifier),
  serial_number         VARCHAR(20),
  date_of_purchase      TIMESTAMP,
  purchased_new         CHAR(1) CHECK (purchased_new IN ('t', 'f')),
  access_rights         INTEGER NOT NULL REFERENCES access_type(identifier)
);
podoc/camera_sql_table.1177070397.txt.gz · Last modified: 2007/04/20 11:59 by Luud