The schema database diagram in documentation (Storage Layer#RDBMS/DatabaseStructure) is created using DbSchema (15-day free trial available).

During major DSpace version changes, the schema usually changes too. This page details the procedure to update the schema and generate the image to be included in documentation as part of the release procedure.

Connect to DSpace database

  1. menu Project -> New Project Connected to Database (Ctrl-N)
  2. Rdbms: Postgres
  3. Fill in Host name, Port, User, Password, Database name
  4. Connect
  5. Select the "public" schema
  6. A default layout will be generated

Add tables to groups

  1. Right-click on empty background and choose "Create group of tables" from the context menu
  2. Fill in group name as per key below (hierarchy, items, ...)
  3. Check "Override Tables Header Color"
  4. Click on color picker, RGB tab, fill in Color Code as per key below (ECE3C3, C3ECE3, ...), click OK
  5. Back in "New group" dialog, include tables from "Tables In No Group" to "Current Group Tables" as per key below
  6. Click OK
community
community2community
community_item_count
communities2item
community2item
community2collection
collection
collection2item
collection_item_count
harvested_collection
item
harvested_item
requestitem
tasklistitem
versionitem
workspaceitem
workflowitem
versionhistory
bundle
bundle2bitstream
bitstream
bitstreamformatregistry
fileextension
item2bundle
most_recent_checksum
checksum_results
checksum_history 
eperson
epersongroup
epersongroup2eperson
epersongroup2workspaceitem
group2groupcache
group2group
registrationdata
metadataschemaregistry
metadatafieldregistry
metadatavalue
dcvalue
handle
doi

Rearrange groups and tables

Keep the main hierarchy horizontal (community, collection, item, bundle, bitstream and their mappings)

Export

  1. Project -> Export as... -> PNG Image
  2.  Crop excessive white background in an image editor
  3. optipng -o9 dspace5.png

Examples

Example exported image:

DSpace 5 schema in DbSchema's editable .dbs format: dspace5.dbs

DSpace 6 schema in DbSchema's editable .dbs format: dspace6.dbs