public.store
| Documentation | Pagila |
| Schema | public |
| Name | store |
| Module | Business |
Contains the store data including manager staff and address
Columns
| Key | Name | Data type | Null | Attributes | References | Description | ||
|---|---|---|---|---|---|---|---|---|
| 1 | store_id | integer | Default: nextval('store_store_id_seq'::regclass) | A surrogate primary key that uniquely identifies the store. | ||||
| A surrogate primary key that uniquely identifies the store. Default: nextval('store_store_id_seq'::regclass) |
||||||||
| 2 | manager_staff_id | smallint | public.staff | A foreign key identifying the manager of this store. | ||||
| A foreign key identifying the manager of this store. References: public.staff |
||||||||
| 3 | address_id | smallint | public.address | A foreign key identifying the address of this store. | ||||
| A foreign key identifying the address of this store. References: public.address |
||||||||
| 4 | last_update | timestamp without time zone(6) | Default: now() | The time that the row was created or most recently updated. | ||||
| The time that the row was created or most recently updated. Default: now() |
||||||||
Relations
| Foreign table | Primary table | Join | Title / Name / Description | |
|---|---|---|---|---|
| public.store | public.address | public.store.address_id = public.address.address_id | store_address_id_fkey Foreign key constraint referencing address.address_id |
|
|
public.store.address_id = public.address.address_id Name: store_address_id_fkeyForeign key constraint referencing address.address_id |
||||
| public.store | public.staff | public.store.manager_staff_id = public.staff.staff_id | store_manager_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
|
public.store.manager_staff_id = public.staff.staff_id Name: store_manager_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
| public.customer | public.store | public.customer.store_id = public.store.store_id | customer_store_id_fkey Foreign key constraint referencing store.store_id |
|
|
public.customer.store_id = public.store.store_id Name: customer_store_id_fkeyForeign key constraint referencing store.store_id |
||||
| public.inventory | public.store | public.inventory.store_id = public.store.store_id | inventory_store_id_fkey Foreign key constraint referencing store.store_id |
|
|
public.inventory.store_id = public.store.store_id Name: inventory_store_id_fkeyForeign key constraint referencing store.store_id |
||||
| public.staff | public.store | public.staff.store_id = public.store.store_id | staff_store_id_fkey Foreign key constraint referencing store.store_id |
|
|
public.staff.store_id = public.store.store_id Name: staff_store_id_fkeyForeign key constraint referencing store.store_id |
||||
Unique keys
| Key name | Columns | Description | |
|---|---|---|---|
| store_pkey | store_id | Primary key. | |
| Primary key. | |||
Triggers
| Key name | When | Description | |
|---|---|---|---|
| last_updated | Before Update | The last_updated trigger sets last_update column of table to the current timestamp. | |
| The last_updated trigger sets last_update column of table to the current timestamp. | |||
Uses
| Name |
|---|
|
public.store
|
Used by
| Name |
|---|
|
public.store
|
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25
