artist_image
PK
id  
image_url  
description  
KEY
artist_image_pkey
exhibition_staff
PK
id  
FK
exhibition_id  
FK
employee_id  
role  
KEY
exhibition_staff_pkey
IX
idx_exhibition_staff_exhibition_id
IX
idx_exhibition_staff_employee_id
gallery
PK
id  
name  
address  
phone  
email  
KEY
gallery_pkey
exhibition_artwork
PK
id  
FK
exhibition_id  
FK
artwork_id  
display_location  
KEY
exhibition_artwork_pkey
IX
idx_exhibition_artwork_exhibition_id
IX
idx_exhibition_artwork_artwork_id
employee
PK
id  
first_name  
last_name  
position  
hire_date  
AK
email  
phone  
KEY
employee_pkey
KEY
employee_email_key
sale
PK
id  
FK
artwork_id  
FK
customer_id  
sale_date  
sale_price  
FK
sale_by  
KEY
sale_pkey
IX
idx_sale_artwork_id
IX
idx_sale_customer_id
supplier
PK
id  
company_name  
first_name  
last_name  
phone  
email  
address  
notes  
KEY
supplier_pkey
artwork
PK
id  
title  
FK
artist_id  
year_created  
medium  
dimensions  
price  
status  
FK
category_id  
description  
KEY
artwork_pkey
IX
idx_artwork_artist_id
IX
idx_artwork_category_id
exhibition
PK
id  
name  
start_date  
end_date  
location  
description  
KEY
exhibition_pkey
loan
PK
id  
FK
artwork_id  
institution  
loan_start  
loan_end  
contact_person  
contact_email  
notes  
KEY
loan_pkey
IX
idx_loan_artwork_id
artwork_category
PK
id  
AK
name  
description  
KEY
artwork_category_pkey
KEY
artwork_category_name_key
artist
PK
id  
first_name  
last_name  
birth_year  
death_year  
nationality  
biography  
FK
artist_image_id  
email  
phone  
address  
KEY
artist_pkey
restoration
PK
id  
FK
artwork_id  
FK
supplier_id  
start_date  
end_date  
description  
cost  
KEY
restoration_pkey
IX
idx_restoration_artwork_id
IX
idx_restoration_supplier_id
artwork_location
PK
id  
FK
artwork_id  
FK
gallery_id  
location_date  
notes  
KEY
artwork_location_pkey
IX
idx_artwork_location_artwork_id
IX
idx_artwork_location_gallery_id
customer
PK
id  
first_name  
last_name  
AK
email  
phone  
address  
KEY
customer_pkey
KEY
customer_email_key
artwork_image
PK
id  
FK
artwork_id  
image_url  
description  
is_main  
KEY
artwork_image_pkey
IX
idx_artwork_image_artwork_id
Artist
Exhibition

Art & Gallery & Exhibition

Sale
Loan
Gallery
Category
Artwork
Documentation for project XDM - art gallery
XDM - art gallery
Project
Name
XDM - art gallery
Diagram
Name
Main Diagram
Report
Generated
11/7/2026 | 12:38:12 AM
tables
Name
artist
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
first_name
character varying
100
Yes
last_name
character varying
100
Yes
birth_year
integer
death_year
integer
nationality
character varying
100
biography
text
artist_image_id
integer
Yes
email
character varying
255
phone
character varying
50
address
text
Keys
artist_pkey
Column in artist_pkey
id
Name
artist_image
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
image_url
character varying
500
Yes
description
text
Keys
artist_image_pkey
Column in artist_image_pkey
id
Relationships
Name
artwork
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
title
character varying
255
Yes
artist_id
integer
Yes
year_created
integer
medium
character varying
100
dimensions
json
price
numeric
12,2
status
character varying
50
Yes
category_id
integer
description
text
Indexes
idx_artwork_artist_id
Column name
artist_id
Nulls last
Yes
Using
btree
idx_artwork_category_id
Column name
category_id
Nulls last
Yes
Using
btree
Keys
artwork_pkey
Column in artwork_pkey
id
Name
artwork_category
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
name
character varying
100
Yes
description
text
Keys
artwork_category_pkey
Column in artwork_category_pkey
id
artwork_category_name_key
Column in artwork_category_name_key
name
Name
artwork_image
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
artwork_id
integer
Yes
image_url
character varying
500
Yes
description
text
is_main
boolean
Indexes
idx_artwork_image_artwork_id
Column name
artwork_id
Nulls last
Yes
Using
btree
Keys
artwork_image_pkey
Column in artwork_image_pkey
id
Name
artwork_location
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
artwork_id
integer
Yes
gallery_id
integer
Yes
location_date
date
Yes
Default value
CURRENT_DATE
notes
text
Indexes
idx_artwork_location_artwork_id
Column name
artwork_id
Nulls last
Yes
Using
btree
idx_artwork_location_gallery_id
Column name
gallery_id
Nulls last
Yes
Using
btree
Keys
artwork_location_pkey
Column in artwork_location_pkey
id
Name
customer
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
first_name
character varying
100
Yes
last_name
character varying
100
Yes
email
character varying
255
phone
character varying
50
address
text
Keys
customer_pkey
Column in customer_pkey
id
customer_email_key
Column in customer_email_key
email
Relationships
Name
employee
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
first_name
character varying
100
Yes
last_name
character varying
100
Yes
position
character varying
100
hire_date
date
email
character varying
255
phone
character varying
50
Keys
employee_pkey
Column in employee_pkey
id
employee_email_key
Column in employee_email_key
email
Name
exhibition
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
name
character varying
255
Yes
start_date
date
Yes
end_date
date
location
character varying
255
description
text
Keys
exhibition_pkey
Column in exhibition_pkey
id
Name
exhibition_artwork
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
exhibition_id
integer
Yes
artwork_id
integer
Yes
display_location
character varying
255
Indexes
idx_exhibition_artwork_exhibition_id
Column name
exhibition_id
Nulls last
Yes
Using
btree
idx_exhibition_artwork_artwork_id
Column name
artwork_id
Nulls last
Yes
Using
btree
Keys
exhibition_artwork_pkey
Column in exhibition_artwork_pkey
id
Name
exhibition_staff
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
exhibition_id
integer
Yes
employee_id
integer
Yes
role
character varying
100
Indexes
idx_exhibition_staff_exhibition_id
Column name
exhibition_id
Nulls last
Yes
Using
btree
idx_exhibition_staff_employee_id
Column name
employee_id
Nulls last
Yes
Using
btree
Keys
exhibition_staff_pkey
Column in exhibition_staff_pkey
id
Name
gallery
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
name
character varying
255
Yes
address
text
phone
character varying
50
email
character varying
255
Keys
gallery_pkey
Column in gallery_pkey
id
Name
loan
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
artwork_id
integer
Yes
institution
character varying
255
Yes
loan_start
date
Yes
loan_end
date
contact_person
character varying
100
contact_email
character varying
255
notes
text
Indexes
idx_loan_artwork_id
Column name
artwork_id
Nulls last
Yes
Using
btree
Keys
loan_pkey
Column in loan_pkey
id
Relationships
Name
restoration
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
artwork_id
integer
Yes
supplier_id
integer
start_date
date
end_date
date
description
text
cost
numeric
12,2
Indexes
idx_restoration_artwork_id
Column name
artwork_id
Nulls last
Yes
Using
btree
idx_restoration_supplier_id
Column name
supplier_id
Nulls last
Yes
Using
btree
Keys
restoration_pkey
Column in restoration_pkey
id
Name
sale
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
artwork_id
integer
Yes
customer_id
integer
Yes
sale_date
date
Yes
sale_price
numeric
12,2
Yes
sale_by
integer
Indexes
idx_sale_artwork_id
Column name
artwork_id
Nulls last
Yes
Using
btree
idx_sale_customer_id
Column name
customer_id
Nulls last
Yes
Using
btree
Keys
sale_pkey
Column in sale_pkey
id
Name
supplier
Properties
Schema
public
Columns
Name
Data type
Param
Key
Not Null
id
serial
Yes
Yes
company_name
character varying
255
Yes
first_name
character varying
100
Yes
last_name
character varying
100
Yes
phone
character varying
50
email
character varying
255
address
text
notes
text
Keys
supplier_pkey
Column in supplier_pkey
id
relationships
Name
artist_artist_image_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artist_image
Column in artist
artist_image_pkey
id
artist_image_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
artwork_artist_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artist
Column in artwork
artist_pkey
id
artist_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
artwork_category_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Optional
Key and columns
Key name
Column in artwork_category
Column in artwork
artwork_category_pkey
id
category_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
artwork_image_artwork_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artwork
Column in artwork_image
artwork_pkey
id
artwork_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
artwork_location_artwork_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artwork
Column in artwork_location
artwork_pkey
id
artwork_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
artwork_location_gallery_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in gallery
Column in artwork_location
gallery_pkey
id
gallery_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
exhibition_artwork_artwork_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artwork
Column in exhibition_artwork
artwork_pkey
id
artwork_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
exhibition_artwork_exhibition_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in exhibition
Column in exhibition_artwork
exhibition_pkey
id
exhibition_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
exhibition_staff_employee_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in employee
Column in exhibition_staff
employee_pkey
id
employee_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
exhibition_staff_exhibition_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in exhibition
Column in exhibition_staff
exhibition_pkey
id
exhibition_id
Properties
Rerefential integrity - parent delete
Cascade
Referential integrity - parent update
No action
Name
loan_artwork_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artwork
Column in loan
artwork_pkey
id
artwork_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
restoration_artwork_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artwork
Column in restoration
artwork_pkey
id
artwork_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
restoration_supplier_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Optional
Key and columns
Key name
Column in supplier
Column in restoration
supplier_pkey
id
supplier_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
sale_artwork_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in artwork
Column in sale
artwork_pkey
id
artwork_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
sale_customer_id_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Mandatory
Key and columns
Key name
Column in customer
Column in sale
customer_pkey
id
customer_id
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Name
sale_sale_by_fkey
Name
Source
Target
Cardinality type:
One to
many
Ordinality:
Mandatory
Optional
Key and columns
Key name
Column in employee
Column in sale
employee_pkey
id
sale_by
Properties
Rerefential integrity - parent delete
No action
Referential integrity - parent update
No action
Notes
Name
Text1
Note

Art & Gallery & Exhibition

Name
Exhibition
Name
Gallery
Name
Sale
Name
Artist
Name
Artwork
Name
Category
Name
Loan