How and why to access the Koha database schema

How and why to access the Koha database schema


SQL reports in Koha can be intimidating. One of the key resources to learn how to more effectively create, edit and read the results of SQL reports within Koha is the database schema site. This site provides a map of the database which includes the specific tables, the content therein and the links between the tables. This information can be used to create reports and also to understand why certain tables were used in existing reports.

Notes
To request a report, please fill out the report request form on our support site.
Go to Reports > Other > Koha database schema.


This will open a page in a new tab. This page will contain an overview of the tables that make up the database schema. 


How to locate a specific table

The table containing the names of the tables in the Koha database is sorted alphabetically by table name by default. To find a specific table, use the Search box above the table containing the names of the tables in the Koha database. 

This search will narrow down the table so only entries that match the search will be included. 


How to view the content of a table

Click the name of the table to see the content of the table. 
This will open a new page with details of the fields in the table.

This page will also include a diagram of how the table links up to other tables in the database.



How to find a specific column in the database

Go to the Columns tab across the top of the home page.

This will open a page where all the column names in the database. These are the different fields that make up a table.


Use the search box at the top of the table to search for a specific field in the database.



This will narrow the table down to tables which contain the field being searched for.



VersionDateDetailAuthor
1.013/03/26Document createdHolly Cooper
1.116/03/26Adding detailsHolly Cooper
1.202/04/26Adding detailsHolly Cooper































    • Related Articles

    • Overview of some SQL Report Functions

      Overview of SQL Report Functions This FAQ is an example of a simple report describing the “anatomy” of the SQL code used.  Details about the different functions are outlined in the table below the report.  Some functions are mandatory to use in order ...
    • How to Find and Run a SQL Report

      What are reports for? Reports are used to find and present data about the information on the system in a structured manner. Reports use SQL to ask questions of the Koha database. How to find reports on your system Go to the Reports module on the Koha ...
    • SQL Report Request Form

      How to submit an SQL report request The following are the steps of requesting a new SQL report to be created. 1. Log a ticket on the support portal to start the process. 2. Take a note of the ticket number. 3. Click the link below to be taken to an ...
    • Support Portal Access Request

      In order to provide access to the support portal we need to record some information from you and adhere to GDPR requirements.  Please download the form attached to this FAQ, complete it and email it to Interleaf 
    • Question of the Week - Using the CASE statement and formatting information to be included in a SQL report

      This document will outline how a list of information can be formatted so it can be easily added to a SQL statement as well as a creative way we used the CASE statement to categorise the different system preferences being shown in an SQL report. The ...