SchemaSpy Analysis of testsql_comments - Constraints Generated by
SchemaSpy
152 Foreign Key Constraints:
SourceForge.net

Constraint Name Child Column Parent Column Delete Rule
accountlines_ibfk_1 accountlines.borrowernumber borrowers.borrowernumber Cascade on delete 
accountlines_ibfk_2 accountlines.itemnumber items.itemnumber Null on delete 
accountoffsets_ibfk_1 accountoffsets.borrowernumber borrowers.borrowernumber Cascade on delete 
aqbasket_ibfk_1 aqbasket.booksellerid aqbooksellers.id Restrict delete 
aqbasket_ibfk_2 aqbasket.contractnumber aqcontract.contractnumber Restrict delete 
aqbasket_ibfk_3 aqbasket.basketgroupid aqbasketgroups.id Restrict delete 
aqbasket_ibfk_4 aqbasket.branch branches.branchcode Null on delete 
aqbasketgroups_ibfk_1 aqbasketgroups.booksellerid aqbooksellers.id Cascade on delete 
aqbasketusers_ibfk_1 aqbasketusers.basketno aqbasket.basketno Cascade on delete 
aqbasketusers_ibfk_2 aqbasketusers.borrowernumber borrowers.borrowernumber Cascade on delete 
aqbooksellers_ibfk_1 aqbooksellers.listprice currency.currency Cascade on delete 
aqbooksellers_ibfk_2 aqbooksellers.invoiceprice currency.currency Cascade on delete 
aqbudgetborrowers_ibfk_1 aqbudgetborrowers.budget_id aqbudgets.budget_id Cascade on delete 
aqbudgetborrowers_ibfk_2 aqbudgetborrowers.borrowernumber borrowers.borrowernumber Cascade on delete 
aqbudgets_planning_ifbk_1 aqbudgets_planning.budget_id aqbudgets.budget_id Cascade on delete 
aqinvoices_fk_aqbooksellerid aqinvoices.booksellerid aqbooksellers.id Cascade on delete 
aqinvoices_fk_shipmentcost_budgetid aqinvoices.shipmentcost_budgetid aqbudgets.budget_id Null on delete 
aqorder_users_ibfk_1 aqorder_users.ordernumber aqorders.ordernumber Cascade on delete 
aqorder_users_ibfk_2 aqorder_users.borrowernumber borrowers.borrowernumber Cascade on delete 
aqorders_budget_id_fk aqorders.budget_id aqbudgets.budget_id Cascade on delete 
aqorders_ibfk_1 aqorders.basketno aqbasket.basketno Cascade on delete 
aqorders_ibfk_2 aqorders.biblionumber biblio.biblionumber Null on delete 
aqorders_ibfk_3 aqorders.invoiceid aqinvoices.invoiceid Null on delete 
aqorders_items_ibfk_1 aqorders_items.ordernumber aqorders.ordernumber Cascade on delete 
aqorders_subscriptionid aqorders.subscriptionid subscription.subscriptionid Cascade on delete 
aqorders_transfers_ordernumber_from aqorders_transfers.ordernumber_from aqorders.ordernumber Null on delete 
aqorders_transfers_ordernumber_to aqorders_transfers.ordernumber_to aqorders.ordernumber Null on delete 
auth_subfield_structure_ibfk_1 auth_subfield_structure.authtypecode auth_types.authtypecode Cascade on delete 
auth_tag_structure_ibfk_1 auth_tag_structure.authtypecode auth_types.authtypecode Cascade on delete 
authorised_values_branches_ibfk_1 authorised_values_branches.av_id authorised_values.id Cascade on delete 
authorised_values_branches_ibfk_2 authorised_values_branches.branchcode branches.branchcode Cascade on delete 
bibliocoverimage_fk1 biblioimages.biblionumber biblio.biblionumber Cascade on delete 
biblioitems_ibfk_1 biblioitems.biblionumber biblio.biblionumber Cascade on delete 
booksellerid_aqcontacts_fk aqcontacts.booksellerid aqbooksellers.id Cascade on delete 
booksellerid_fk1 aqcontract.booksellerid aqbooksellers.id Cascade on delete 
borrower_attribute_types_branches_ibfk_1 borrower_attribute_types_branches.bat_code borrower_attribute_types.code Cascade on delete 
borrower_attribute_types_branches_ibfk_2 borrower_attribute_types_branches.b_branchcode branches.branchcode Cascade on delete 
borrower_attributes_ibfk_1 borrower_attributes.borrowernumber borrowers.borrowernumber Cascade on delete 
borrower_attributes_ibfk_2 borrower_attributes.code borrower_attribute_types.code Cascade on delete 
borrower_borrower_circ_rules_ibfk_1 default_borrower_circ_rules.categorycode categories.categorycode Cascade on delete 
borrower_debarments_ibfk_1 borrower_debarments.borrowernumber borrowers.borrowernumber Cascade on delete 
borrower_discharges_ibfk1 discharges.borrower borrowers.borrowernumber Cascade on delete 
borrower_files_ibfk_1 borrower_files.borrowernumber borrowers.borrowernumber Cascade on delete 
borrower_message_preferences_ibfk_1 borrower_message_preferences.borrowernumber borrowers.borrowernumber Cascade on delete 
borrower_message_preferences_ibfk_2 borrower_message_preferences.message_attribute_id message_attributes.message_attribute_id Cascade on delete 
borrower_message_preferences_ibfk_3 borrower_message_preferences.categorycode categories.categorycode Cascade on delete 
borrower_message_transport_preferences_ibfk_1 borrower_message_transport_preferences.borrower_message_preference_id borrower_message_preferences.borrower_message_preference_id Cascade on delete 
borrower_message_transport_preferences_ibfk_2 borrower_message_transport_preferences.message_transport_type message_transport_types.message_transport_type Cascade on delete 
borrower_sync_ibfk_1 borrower_sync.borrowernumber borrowers.borrowernumber Cascade on delete 
borrowers_ibfk_1 borrowers.categorycode categories.categorycode Restrict delete 
borrowers_ibfk_2 borrowers.branchcode branches.branchcode Restrict delete 
branch_borrower_circ_rules_ibfk_1 branch_borrower_circ_rules.categorycode categories.categorycode Cascade on delete 
branch_borrower_circ_rules_ibfk_2 branch_borrower_circ_rules.branchcode branches.branchcode Cascade on delete 
branch_item_rules_ibfk_1 branch_item_rules.itemtype itemtypes.itemtype Cascade on delete 
branch_item_rules_ibfk_2 branch_item_rules.branchcode branches.branchcode Cascade on delete 
branchrelations_ibfk_1 branchrelations.branchcode branches.branchcode Cascade on delete 
branchrelations_ibfk_2 branchrelations.categorycode branchcategories.categorycode Cascade on delete 
branchtransfers_ibfk_1 branchtransfers.frombranch branches.branchcode Cascade on delete 
branchtransfers_ibfk_2 branchtransfers.tobranch branches.branchcode Cascade on delete 
branchtransfers_ibfk_3 branchtransfers.itemnumber items.itemnumber Cascade on delete 
categories_branches_ibfk_1 categories_branches.categorycode categories.categorycode Cascade on delete 
categories_branches_ibfk_2 categories_branches.branchcode branches.branchcode Cascade on delete 
class_source_ibfk_1 class_sources.class_sort_rule class_sort_rules.class_sort_rule Restrict delete 
collections_ibfk_1 collections.colBranchcode branches.branchcode Cascade on delete 
course_instructors_ibfk_1 course_instructors.borrowernumber borrowers.borrowernumber Cascade on delete 
course_instructors_ibfk_2 course_instructors.course_id courses.course_id Restrict delete 
course_items_ibfk_1 course_items.itemnumber items.itemnumber Cascade on delete 
course_items_ibfk_2 course_items.holdingbranch branches.branchcode Cascade on delete 
course_reserves_ibfk_1 course_reserves.course_id courses.course_id Restrict delete 
course_reserves_ibfk_2 course_reserves.ci_id course_items.ci_id Cascade on delete 
creator_batches_ibfk_1 creator_batches.borrower_number borrowers.borrowernumber Cascade on delete 
creator_batches_ibfk_2 creator_batches.branch_code branches.branchcode Cascade on delete 
creator_batches_ibfk_3 creator_batches.item_number items.itemnumber Cascade on delete 
default_branch_circ_rules_ibfk_1 default_branch_circ_rules.branchcode branches.branchcode Cascade on delete 
default_branch_item_rules_ibfk_1 default_branch_item_rules.itemtype itemtypes.itemtype Cascade on delete 
hold_fill_targets_ibfk_1 hold_fill_targets.borrowernumber borrowers.borrowernumber Cascade on delete 
hold_fill_targets_ibfk_2 hold_fill_targets.biblionumber biblio.biblionumber Cascade on delete 
hold_fill_targets_ibfk_3 hold_fill_targets.itemnumber items.itemnumber Cascade on delete 
hold_fill_targets_ibfk_4 hold_fill_targets.source_branchcode branches.branchcode Cascade on delete 
import_auths_ibfk_1 import_auths.import_record_id import_records.import_record_id Cascade on delete 
import_biblios_ibfk_1 import_biblios.import_record_id import_records.import_record_id Cascade on delete 
import_items_ibfk_1 import_items.import_record_id import_records.import_record_id Cascade on delete 
import_record_matches_ibfk_1 import_record_matches.import_record_id import_records.import_record_id Cascade on delete 
import_records_ifbk_1 import_records.import_batch_id import_batches.import_batch_id Cascade on delete 
issues_ibfk_1 issues.borrowernumber borrowers.borrowernumber Restrict delete 
issues_ibfk_2 issues.itemnumber items.itemnumber Restrict delete 
items_ibfk_1 items.biblioitemnumber biblioitems.biblioitemnumber Cascade on delete 
items_ibfk_2 items.homebranch branches.branchcode Restrict delete 
items_ibfk_3 items.holdingbranch branches.branchcode Restrict delete 
items_search_fields_authorised_values_category items_search_fields.authorised_values_category authorised_values.category Null on delete 
matcher_matchchecks_ifbk_1 matchchecks.matcher_id marc_matchers.matcher_id Cascade on delete 
matcher_matchchecks_ifbk_2 matchchecks.source_matchpoint_id matchpoints.matchpoint_id Cascade on delete 
matcher_matchchecks_ifbk_3 matchchecks.target_matchpoint_id matchpoints.matchpoint_id Cascade on delete 
matcher_matchpoints_ifbk_1 matcher_matchpoints.matcher_id marc_matchers.matcher_id Cascade on delete 
matcher_matchpoints_ifbk_2 matcher_matchpoints.matchpoint_id matchpoints.matchpoint_id Cascade on delete 
matchpoint_component_norms_ifbk_1 matchpoint_component_norms.matchpoint_component_id matchpoint_components.matchpoint_component_id Cascade on delete 
matchpoint_components_ifbk_1 matchpoint_components.matchpoint_id matchpoints.matchpoint_id Cascade on delete 
matchpoints_ifbk_1 matchpoints.matcher_id marc_matchers.matcher_id Cascade on delete 
message_transport_type_fk letter.message_transport_type message_transport_types.message_transport_type Cascade on delete 
message_transports_ibfk_1 message_transports.message_attribute_id message_attributes.message_attribute_id Cascade on delete 
message_transports_ibfk_2 message_transports.message_transport_type message_transport_types.message_transport_type Cascade on delete 
message_transports_ibfk_3 message_transports.letter_module
message_transports.letter_code
message_transports.branchcode
letter.module
letter.code
letter.branchcode
Cascade on delete 
messageq_ibfk_1 message_queue.borrowernumber borrowers.borrowernumber Cascade on delete 
messageq_ibfk_2 message_queue.message_transport_type message_transport_types.message_transport_type Restrict delete 
mmta_ibfk_1 marc_modification_template_actions.template_id marc_modification_templates.template_id Cascade on delete 
mtt_fk overduerules_transport_types.message_transport_type message_transport_types.message_transport_type Cascade on delete 
oai_sets_biblios_ibfk_1 oai_sets_biblios.biblionumber biblio.biblionumber Cascade on delete 
oai_sets_biblios_ibfk_2 oai_sets_biblios.set_id oai_sets.id Cascade on delete 
oai_sets_descriptions_ibfk_1 oai_sets_descriptions.set_id oai_sets.id Cascade on delete 
oai_sets_mappings_ibfk_1 oai_sets_mappings.set_id oai_sets.id Cascade on delete 
old_issues_ibfk_1 old_issues.borrowernumber borrowers.borrowernumber Null on delete 
old_issues_ibfk_2 old_issues.itemnumber items.itemnumber Null on delete 
old_reserves_ibfk_1 old_reserves.borrowernumber borrowers.borrowernumber Null on delete 
old_reserves_ibfk_2 old_reserves.biblionumber biblio.biblionumber Null on delete 
old_reserves_ibfk_3 old_reserves.itemnumber items.itemnumber Null on delete 
opac_news_branchcode_ibfk opac_news.branchcode branches.branchcode Cascade on delete 
overduerules_fk overduerules_transport_types.branchcode
overduerules_transport_types.categorycode
overduerules.branchcode
overduerules.categorycode
Cascade on delete 
patron_list_patrons_ibfk_1 patron_list_patrons.patron_list_id patron_lists.patron_list_id Cascade on delete 
patron_list_patrons_ibfk_2 patron_list_patrons.borrowernumber borrowers.borrowernumber Cascade on delete 
patron_lists_ibfk_1 patron_lists.owner borrowers.borrowernumber Cascade on delete 
patronimage_fk1 patronimage.borrowernumber borrowers.borrowernumber Cascade on delete 
permissions_ibfk_1 permissions.module_bit userflags.bit Cascade on delete 
ratings_ibfk_1 ratings.borrowernumber borrowers.borrowernumber Cascade on delete 
ratings_ibfk_2 ratings.biblionumber biblio.biblionumber Cascade on delete 
reserves_ibfk_1 reserves.borrowernumber borrowers.borrowernumber Cascade on delete 
reserves_ibfk_2 reserves.biblionumber biblio.biblionumber Cascade on delete 
reserves_ibfk_3 reserves.itemnumber items.itemnumber Cascade on delete 
reserves_ibfk_4 reserves.branchcode branches.branchcode Cascade on delete 
reviews_ibfk_1 reviews.borrowernumber borrowers.borrowernumber Null on delete 
reviews_ibfk_2 reviews.biblionumber biblio.biblionumber Cascade on delete 
serialitems_sfk_1 serialitems.serialid serial.serialid Cascade on delete 
serialitems_sfk_2 serialitems.itemnumber items.itemnumber Cascade on delete 
shelfcontents_ibfk_2 virtualshelfcontents.biblionumber biblio.biblionumber Cascade on delete 
shelfcontents_ibfk_3 virtualshelfcontents.borrowernumber borrowers.borrowernumber Null on delete 
subscription_ibfk_1 subscription.periodicity subscription_frequencies.id Null on delete 
subscription_ibfk_2 subscription.numberpattern subscription_numberpatterns.id Null on delete 
subscriptionroutinglist_ibfk_1 subscriptionroutinglist.borrowernumber borrowers.borrowernumber Cascade on delete 
subscriptionroutinglist_ibfk_2 subscriptionroutinglist.subscriptionid subscription.subscriptionid Cascade on delete 
suggestions_budget_id_fk suggestions.budgetid aqbudgets.budget_id Null on delete 
tags_approval_borrowers_fk_1 tags_approval.approved_by borrowers.borrowernumber Null on delete 
tags_biblionumber_fk_1 tags_all.biblionumber biblio.biblionumber Cascade on delete 
tags_borrowers_fk_1 tags_all.borrowernumber borrowers.borrowernumber Null on delete 
tags_index_biblionumber_fk_1 tags_index.biblionumber biblio.biblionumber Cascade on delete 
tags_index_term_fk_1 tags_index.term tags_approval.term Cascade on delete 
transport_cost_ibfk_1 transport_cost.frombranch branches.branchcode Cascade on delete 
transport_cost_ibfk_2 transport_cost.tobranch branches.branchcode Cascade on delete 
user_permissions_ibfk_1 user_permissions.borrowernumber borrowers.borrowernumber Cascade on delete 
user_permissions_ibfk_2 user_permissions.module_bit
user_permissions.code
permissions.module_bit
permissions.code
Cascade on delete 
virtualshelfcontents_ibfk_1 virtualshelfcontents.shelfnumber virtualshelves.shelfnumber Cascade on delete 
virtualshelfshares_ibfk_1 virtualshelfshares.shelfnumber virtualshelves.shelfnumber Cascade on delete 
virtualshelfshares_ibfk_2 virtualshelfshares.borrowernumber borrowers.borrowernumber Null on delete 
virtualshelves_ibfk_1 virtualshelves.owner borrowers.borrowernumber Null on delete 

Check Constraints:

Table Constraint Name Constraint
None detected