public.staff
Documentation | Pagila |
Schema | public |
Name | staff |
Module | Business |
Stores staff data
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | staff_id | integer | Default: nextval('staff_staff_id_seq'::regclass) | A surrogate primary key that uniquely identifies the staff member. | ||||
A surrogate primary key that uniquely identifies the staff member. Default: nextval('staff_staff_id_seq'::regclass) |
||||||||
2 | first_name | character varying(45) | The first name of the staff member. | |||||
The first name of the staff member. |
||||||||
3 | last_name | character varying(45) | The last name of the staff member. | |||||
The last name of the staff member. |
||||||||
4 | address_id | smallint | public.address | A foreign key to the staff member's address in the address table. | ||||
A foreign key to the staff member's address in the address table. References: public.address |
||||||||
5 | character varying(50) | The staff member's email address. | ||||||
The staff member's email address. |
||||||||
6 | store_id | smallint | public.store | The staff member's “home store”. The employee can work at other stores but is generally assigned to the store listed. | ||||
The staff member's “home store”. The employee can work at other stores but is generally assigned to the store listed. References: public.store |
||||||||
7 | active | boolean | Default: true | Whether this is an active employee. If employees leave their rows are not deleted from this table, instead this column is set to FALSE. | ||||
Whether this is an active employee. If employees leave their rows are not deleted from this table, instead this column is set to FALSE. Default: true |
||||||||
8 | username | character varying(16) | The user name used by the staff member to access the rental system. | |||||
The user name used by the staff member to access the rental system. |
||||||||
9 | password | character varying(40) | he password used by the staff member to access the rental system. | |||||
he password used by the staff member to access the rental system. |
||||||||
10 | 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() |
||||||||
11 | picture | bytea | A field containing a photograph of the employee. | |||||
A field containing a photograph of the employee. |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
public.staff | public.address | public.staff.address_id = public.address.address_id | staff_address_id_fkey Foreign key constraint referencing address.address_id |
|
public.staff.address_id = public.address.address_id Name: staff_address_id_fkeyForeign key constraint referencing address.address_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 |
||||
public.payment | public.staff | public.payment.staff_id = public.staff.staff_id | payment_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment.staff_id = public.staff.staff_id Name: payment_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment_p2007_01 | public.staff | public.payment_p2007_01.staff_id = public.staff.staff_id | payment_p2007_01_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment_p2007_01.staff_id = public.staff.staff_id Name: payment_p2007_01_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment_p2007_02 | public.staff | public.payment_p2007_02.staff_id = public.staff.staff_id | payment_p2007_02_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment_p2007_02.staff_id = public.staff.staff_id Name: payment_p2007_02_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment_p2007_03 | public.staff | public.payment_p2007_03.staff_id = public.staff.staff_id | payment_p2007_03_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment_p2007_03.staff_id = public.staff.staff_id Name: payment_p2007_03_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment_p2007_04 | public.staff | public.payment_p2007_04.staff_id = public.staff.staff_id | payment_p2007_04_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment_p2007_04.staff_id = public.staff.staff_id Name: payment_p2007_04_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment_p2007_05 | public.staff | public.payment_p2007_05.staff_id = public.staff.staff_id | payment_p2007_05_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment_p2007_05.staff_id = public.staff.staff_id Name: payment_p2007_05_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.payment_p2007_06 | public.staff | public.payment_p2007_06.staff_id = public.staff.staff_id | payment_p2007_06_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.payment_p2007_06.staff_id = public.staff.staff_id Name: payment_p2007_06_staff_id_fkeyForeign key constraint referencing staff.staff_id |
||||
public.rental | public.staff | public.rental.staff_id = public.staff.staff_id | rental_staff_id_fkey Foreign key constraint referencing staff.staff_id |
|
public.rental.staff_id = public.staff.staff_id Name: rental_staff_id_fkeyForeign key constraint referencing staff.staff_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 |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
staff_pkey | staff_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.staff
|
Used by
Exported: 2018-10-12 17:07, Last imported: 2018-08-06 09:25