SchemaSpy Analysis of testsql_comments - Constraints Generated by
SchemaSpy
181 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 
afv_fk additional_field_values.field_id additional_fields.id 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_currency aqorders.currency currency.currency Null 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 
article_requests_ibfk_1 article_requests.borrowernumber borrowers.borrowernumber Cascade on delete 
article_requests_ibfk_2 article_requests.biblionumber biblio.biblionumber Cascade on delete 
article_requests_ibfk_3 article_requests.itemnumber items.itemnumber Null on delete 
article_requests_ibfk_4 article_requests.branchcode branches.branchcode 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_authorised_values_category authorised_values.category authorised_value_categories.category_name 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 
borrowernumber_fk opac_news.borrowernumber borrowers.borrowernumber Null on delete 
borrowers_ibfk_1 borrowers.categorycode categories.categorycode Restrict delete 
borrowers_ibfk_2 borrowers.branchcode branches.branchcode Restrict delete 
borrowers_ibfk_3 borrowers.sms_provider_id sms_providers.id Null on 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 
edifact_msg_fk aqinvoices.message_id edifact_messages.id Null on delete 
efk_branchcode edifact_ean.branchcode branches.branchcode Restrict delete 
emfk_basketno edifact_messages.basketno aqbasket.basketno Cascade on delete 
emfk_edi_acct edifact_messages.edi_acct vendor_edi_accounts.id Cascade on delete 
emfk_vendor edifact_messages.vendor_id aqbooksellers.id 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 
housebound_profile_bnfk housebound_profile.borrowernumber borrowers.borrowernumber Cascade on delete 
houseboundrole_bnfk housebound_role.borrowernumber_id borrowers.borrowernumber Cascade on delete 
houseboundvisit_bnfk housebound_visit.borrowernumber housebound_profile.borrowernumber Cascade on delete 
houseboundvisit_bnfk_1 housebound_visit.chooser_brwnumber borrowers.borrowernumber Cascade on delete 
houseboundvisit_bnfk_2 housebound_visit.deliverer_brwnumber borrowers.borrowernumber 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_ibfk_4 items.biblionumber biblio.biblionumber Cascade on delete 
items_last_borrower_ibfk_1 items_last_borrower.itemnumber items.itemnumber Cascade on delete 
items_last_borrower_ibfk_2 items_last_borrower.borrowernumber borrowers.borrowernumber Cascade on delete 
items_search_fields_authorised_values_category items_search_fields.authorised_values_category authorised_value_categories.category_name Null on delete 
marc_subfield_structure_ibfk_1 marc_subfield_structure.authorised_value authorised_value_categories.category_name 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 
messages_ibfk_1 messages.manager_id borrowers.borrowernumber Null on 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_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 
old_reserves_ibfk_4 old_reserves.itemtype itemtypes.itemtype Null on delete 
opac_news_branchcode_ibfk opac_news.branchcode branches.branchcode Cascade on delete 
overduerules_fk overduerules_transport_types.overduerules_id overduerules.overduerules_id 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 
reserves_ibfk_5 reserves.itemtype itemtypes.itemtype Cascade on delete 
reviews_ibfk_1 reviews.borrowernumber borrowers.borrowernumber Null on delete 
reviews_ibfk_2 reviews.biblionumber biblio.biblionumber Cascade on delete 
search_marc_to_field_ibfk_1 search_marc_to_field.search_marc_map_id search_marc_map.id Cascade on delete 
search_marc_to_field_ibfk_2 search_marc_to_field.search_field_id search_field.id 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 
vfk_shipment_budget vendor_edi_accounts.shipment_budget aqbudgets.budget_id Restrict delete 
vfk_vendor_id vendor_edi_accounts.vendor_id aqbooksellers.id Restrict 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