public.customers
Documentation | Dell DVD Store |
Schema | public |
Name | customers |
Module | Dell DVD Store database diagram |
Stores customers data.
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | customerid | integer |
Identity / Auto increment column
Default: nextval('customers_customerid_seq'::regclass) |
Customer identification number.Primary key for employee table. | ||||
Customer identification number.Primary key for employee table. Identity / Auto increment column Default: nextval('customers_customerid_seq'::regclass) |
||||||||
2 | firstname | character varying(50) | The customer's first name. | |||||
The customer's first name. |
||||||||
3 | lastname | character varying(50) | The customer's last name. | |||||
The customer's last name. |
||||||||
4 | address1 | character varying(50) | The first line of an address. | |||||
The first line of an address. |
||||||||
5 | address2 | character varying(50) | An optional second line of an address. | |||||
An optional second line of an address. |
||||||||
6 | city | character varying(50) | Name of the city. | |||||
Name of the city. |
||||||||
7 | state | character varying(50) | Standard state or province code. | |||||
Standard state or province code. |
||||||||
8 | zip | character varying(9) | The postal code or ZIP code of the address (where applicable). | |||||
The postal code or ZIP code of the address (where applicable). |
||||||||
9 | country | character varying(50) | The country name. | |||||
The country name. |
||||||||
10 | region | smallint | Region id. | |||||
Region id. |
||||||||
11 | character varying(50) | The customer's email address. | ||||||
The customer's email address. |
||||||||
12 | phone | character varying(50) | The telephone number for the address. | |||||
The telephone number for the address. |
||||||||
13 | creditcardtype | integer | Credit card expiration date type. | |||||
Credit card expiration date type. |
||||||||
14 | creditcard | character varying(50) | Credit card identification number. | |||||
Credit card identification number. |
||||||||
15 | creditcardexpiration | character varying(50) | Credit card expiration date. | |||||
Credit card expiration date. |
||||||||
16 | username | character varying(50) | Account username. | |||||
Account username. |
||||||||
17 | password | character varying(50) | Account password. | |||||
Account password. |
||||||||
18 | age | smallint | The customer's age. | |||||
The customer's age. |
||||||||
19 | income | integer | The customer's income. | |||||
The customer's income. |
||||||||
20 | gender | character varying(1) | M = Male, F = Female | |||||
M = Male, F = Female |
Relations
Foreign table | Primary table | Join | Title / Name / Description | |
---|---|---|---|---|
public.cust_hist | public.customers | public.cust_hist.customerid = public.customers.customerid | fk_cust_hist_customerid Foreign key constraint referencing customers.customerid |
|
public.cust_hist.customerid = public.customers.customerid Name: fk_cust_hist_customeridForeign key constraint referencing customers.customerid |
||||
public.orders | public.customers | public.orders.customerid = public.customers.customerid | fk_customerid Foreign key constraint referencing customers.customerid |
|
public.orders.customerid = public.customers.customerid Name: fk_customeridForeign key constraint referencing customers.customerid |
Unique keys
Key name | Columns | Description | |
---|---|---|---|
customers_pkey | customerid | Primary key. | |
Primary key. |
Used by
Name |
---|
public.customers
|
Exported: 2018-11-09 16:14, Last imported: 2018-08-06 09:39