Dumped on 2008-04-01

Index of database - autodocregress


Schema inherit


Table: inherit.tab1

inherit.tab1 Structure
F-Key Name Type Description
col1 integer

Index - Schema inherit


Table: inherit.tab1b

inherit.tab1b Structure
F-Key Name Type Description
col1 integer
cola integer
colb integer
col1b integer

Index - Schema inherit


Table: inherit.taba

inherit.taba Structure
F-Key Name Type Description
cola integer

Index - Schema inherit


Table: inherit.tabb

inherit.tabb Structure
F-Key Name Type Description
cola integer
colb integer

Index - Schema inherit


Schema product

This schema stores a list of products and information about the product


Table: product.product

product.product Structure
F-Key Name Type Description
product_id serial PRIMARY KEY
product_code text UNIQUE NOT NULL
product_description text

 

product.product Constraints
Name Constraint
product_product_code_check CHECK ((product_code = upper(product_code)))

Tables referencing this one via Foreign Key Constraints:

Index - Schema product


Function: product.worker( integer, integer )

Returns: integer

Language: SQL

Worker function appropriate for products

SELECT $1 + $1;

Schema store


Table: store.inventory

Store inventory

store.inventory Structure
F-Key Name Type Description
store.store.store_id store_id integer PRIMARY KEY
product.product.product_id product_id integer PRIMARY KEY
quantity integer NOT NULL

 

store.inventory Constraints
Name Constraint
inventory_quantity_check CHECK ((quantity > 0))

Index - Schema store


Table: store.store

store.store Structure
F-Key Name Type Description
store_id serial PRIMARY KEY
store_code text UNIQUE NOT NULL
store_description text

 

store.store Constraints
Name Constraint
store_store_code_check CHECK ((store_code = upper(store_code)))

Tables referencing this one via Foreign Key Constraints:

Index - Schema store


Schema warehouse

A list of warehouses and information on warehouses


Table: warehouse.inventory

Warehouse inventory

warehouse.inventory Structure
F-Key Name Type Description
warehouse.warehouse.warehouse_id warehouse_id integer PRIMARY KEY
product.product.product_id product_id integer PRIMARY KEY
quantity integer NOT NULL

 

warehouse.inventory Constraints
Name Constraint
inventory_quantity_check CHECK ((quantity > 0))

Index - Schema warehouse


View: warehouse.products

warehouse.products Structure
F-Key Name Type Description
product_id integer
product_code text
product_description text
SELECT DISTINCT product.product_id
, product.product_code
, product.product_description 
FROM (warehouse.inventory 
  JOIN product.product 
 USING (product_id)
)
ORDER BY product.product_id
, product.product_code
, product.product_description;

Index - Schema warehouse


Table: warehouse.warehouse

warehouse.warehouse Structure
F-Key Name Type Description
warehouse_id serial PRIMARY KEY
warehouse_code text UNIQUE NOT NULL

Internal code which represents warehouses for invoice purposes
warehouse_manager text NOT NULL

Name of Warehouse Manager
warehouse_supervisor text UNIQUE

Supervisors name for a warehouse when one has been assigned. The same supervisor may not be assigned to more than one warehouse, per company policy XYZ.
warehouse_description text

 

warehouse.warehouse Constraints
Name Constraint
warehouse_check CHECK ((upper(warehouse_manager) <> upper(warehouse_supervisor)))
warehouse_warehouse_code_check CHECK ((warehouse_code = upper(warehouse_code)))

Tables referencing this one via Foreign Key Constraints:

Index - Schema warehouse


Function: warehouse.worker( integer, integer )

Returns: integer

Language: SQL

Worker function appropriate for warehouses.

SELECT $1 * $1;

Generated by PostgreSQL Autodoc

W3C HTML 4.01 Strict