App-PhotoDB

 view release on metacpan or  search on metacpan

docs/SCHEMA.pod  view on Meta::CPAN

=head1 PhotoDB schema documentation

This documentation is generated automatically from the database schema itself with the C<travis/dump-schema.pl> script, using table and column comments embedded in the database

=head2 ACCESSORY

Table to catalog accessories that are not tracked in more specific tables

    +-------------------+--------------+---------------------------------------+
    | COLUMN_NAME       | COLUMN_TYPE  | COLUMN_COMMENT                        |
    +-------------------+--------------+---------------------------------------+
    | accessory_id      | int(11)      | Unique ID of this accessory           |
    | accessory_type_id | int(11)      | ID of this type of accessory          |
    | manufacturer_id   | int(11)      | ID of the manufacturer                |
    | model             | varchar(45)  | Model of the accessory                |
    | acquired          | date         | Date that this accessory was acquired |
    | cost              | decimal(5,2) | Purchase cost of the accessory        |
    | lost              | date         | Date that this accessory was lost     |
    | lost_price        | decimal(5,2) | Sale price of the accessory           |
    +-------------------+--------------+---------------------------------------+

=head2 ACCESSORY_COMPAT

Table to define compatibility between accessories and cameras or lenses

    +----------------+-------------+-----------------------------------+
    | COLUMN_NAME    | COLUMN_TYPE | COLUMN_COMMENT                    |
    +----------------+-------------+-----------------------------------+
    | compat_id      | int(11)     | Unique ID for this compatibility  |
    | accessory_id   | int(11)     | ID of the accessory               |
    | cameramodel_id | int(11)     | ID of the compatible camera model |
    | lensmodel_id   | int(11)     | ID of the compatible lens         |
    +----------------+-------------+-----------------------------------+

=head2 ACCESSORY_TYPE

Table to catalog types of photographic accessory

    +-------------------+-------------+--------------------------------------+
    | COLUMN_NAME       | COLUMN_TYPE | COLUMN_COMMENT                       |
    +-------------------+-------------+--------------------------------------+
    | accessory_type_id | int(11)     | Unique ID for this type of accessory |
    | accessory_type    | varchar(45) | Type of accessory                    |
    +-------------------+-------------+--------------------------------------+

=head2 ARCHIVE

Table to list all archives that exist for storing physical media

    +-----------------+-------------+------------------------------------------------------------------------------+
    | COLUMN_NAME     | COLUMN_TYPE | COLUMN_COMMENT                                                               |
    +-----------------+-------------+------------------------------------------------------------------------------+
    | archive_id      | int(11)     | Unique ID of this archive                                                    |
    | archive_type_id | int(11)     | ID of this type of archive                                                   |
    | name            | varchar(45) | Name of this archive                                                         |
    | max_width       | int(11)     | Maximum width of media that this archive can store                           |
    | max_height      | int(11)     | Maximum height of media that this archive can store                          |
    | location        | varchar(45) | Location of this archive                                                     |
    | storage         | varchar(45) | The type of storage used for this archive, e.g. box, folder, ringbinder, etc |
    | sealed          | tinyint(1)  | Whether or not this archive is sealed (closed to new additions)              |
    +-----------------+-------------+------------------------------------------------------------------------------+

=head2 ARCHIVE_TYPE

Table to list the different types of archive available for materials

    +-----------------+-------------+------------------------------+
    | COLUMN_NAME     | COLUMN_TYPE | COLUMN_COMMENT               |
    +-----------------+-------------+------------------------------+
    | archive_type_id | int(11)     | Unique ID of archive type    |
    | archive_type    | varchar(45) | Name of this type of archive |
    +-----------------+-------------+------------------------------+

=head2 BATTERY

Table to catalog of types of battery

    +--------------+--------------+-------------------------------------------------+
    | COLUMN_NAME  | COLUMN_TYPE  | COLUMN_COMMENT                                  |
    +--------------+--------------+-------------------------------------------------+
    | battery_type | int(11)      | Unique battery ID                               |
    | battery_name | varchar(45)  | Common name of the battery                      |
    | voltage      | decimal(4,2) | Nominal voltage of the battery                  |
    | chemistry    | varchar(45)  | Battery chemistry (e.g. Alkaline, Lithium, etc) |
    | other_names  | varchar(45)  | Alternative names for this kind of battery      |
    +--------------+--------------+-------------------------------------------------+

=head2 BODY_TYPE

Table to catalog types of camera body style

    +--------------+-------------+---------------------------------------------------+
    | COLUMN_NAME  | COLUMN_TYPE | COLUMN_COMMENT                                    |
    +--------------+-------------+---------------------------------------------------+
    | body_type_id | int(11)     | Unique body type ID                               |
    | body_type    | varchar(45) | Name of camera body type (e.g. SLR, compact, etc) |
    +--------------+-------------+---------------------------------------------------+

=head2 CAMERA

Table to catalog cameras - both cameras with fixed lenses and cameras with interchangeable lenses

    +----------------+--------------+------------------------------------------------------------------------+
    | COLUMN_NAME    | COLUMN_TYPE  | COLUMN_COMMENT                                                         |
    +----------------+--------------+------------------------------------------------------------------------+
    | camera_id      | int(11)      | Auto-incremented camera ID                                             |
    | cameramodel_id | int(11)      | ID which specifies the model of camera                                 |
    | acquired       | date         | Date on which the camera was acquired                                  |
    | cost           | decimal(6,2) | Price paid for the camera, in local currency units                     |
    | serial         | varchar(45)  | Serial number of the camera                                            |
    | datecode       | varchar(12)  | Date code of the camera, if different from the serial number           |
    | manufactured   | smallint(6)  | Year of manufacture of the camera                                      |
    | own            | tinyint(1)   | Whether the camera is currently owned                                  |
    | lens_id        | int(11)      | If fixed_mount is true, specify the lens_id                            |
    | notes          | text         | Freeform text field for extra notes                                    |
    | lost           | date         | Date on which the camera was lost/sold/etc                             |
    | lost_price     | decimal(6,2) | Price at which the camera was sold                                     |
    | source         | varchar(150) | Where the camera was acquired from                                     |
    | condition_id   | int(11)      | Denotes the cosmetic condition of the camera                           |



( run in 1.036 second using v1.01-cache-2.11-cpan-2398b32b56e )