User Tools

Site Tools


podoc:camera_sql_table

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
podoc:camera_sql_table [2007/04/18 14:17] Luudpodoc:camera_sql_table [2007/04/20 14:25] Luud
Line 7: Line 7:
 === Description === === Description ===
  
-A listing of all *specific* cameras that the users own, complete with serial number.   A camera can be associated with a photo.+A listing of all *specific* cameras that the users owns, complete with serial number. A camera can be associated with a photo.
  
 === Purpose === === Purpose ===
Line 15: Line 15:
 === Schema === === Schema ===
  
-  create table camera ( +<code sql> 
-    identifier            integer not null primary key, +create table camera ( 
-    type                  integer references camera_type(identifier), +  identifier            integer not null primary key, 
-    users                 integer references users(identifier), +  type                  integer references camera_type(identifier), 
-    serial_number         varchar(20), +  users                 integer references users(identifier), 
-    date_of_purchase      timestamp, +  serial_number         varchar(20), 
-    purchased_new         char(1) check (purchased_new in ('t', 'f')), +  date_of_purchase      timestamp, 
-    access_rights         integer not null references access_type(identifier) +  purchased_new         char(1) check (purchased_new in ('t', 'f')), 
-  );+  access_rights         integer not null references access_type(identifier) 
 +); 
 +</code> 
 + 
 +=== References tables === 
 + 
 +  * type references [[camera_type sql table|camera_type]](identifier) 
 +  * users references [[users sql table|users]](identifier) 
 +  * access_rights references [[access_type sql table|access_type]](identifier) 
 + 
 +=== Is referenced by tables === 
 + 
 +  * [[photo_tech sql table|photo_tech]](camera) references identifier
  
 === Related sequences === === Related sequences ===
Line 40: Line 52:
  
 === Related views === === Related views ===
 +
 +  * [[view_camera sql view|view_camera]]
  
 === History === === History ===
Line 55: Line 69:
 = Version 2.5 = = Version 2.5 =
  
-  create table camera ( +<code sql> 
-    identifier            integer not null primary key, +create table camera ( 
-    type                  integer references camera_type(identifier), +  identifier            integer not null primary key, 
-    users                 integer references users(identifier), +  type                  integer references camera_type(identifier), 
-    serial_number         varchar(20), +  users                 integer references users(identifier), 
-    date_of_purchase      timestamp, +  serial_number         varchar(20), 
-    purchased_new         char(1) check (purchased_new in ('t', 'f')), +  date_of_purchase      timestamp, 
-    access_rights         integer not null references access_type(identifier) +  purchased_new         char(1) check (purchased_new in ('t', 'f')), 
-  );+  access_rights         integer not null references access_type(identifier) 
 +); 
 +</code>
  
podoc/camera_sql_table.txt · Last modified: 2007/10/19 20:05 by Luud