These tables hold data that describe the library and set the library's operating parameters.
Three tables contain data about the library's branches:
DESCRIBE branches; +----------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+------------+------+-----+---------+-------+ | branchcode | varchar(4) | | PRI | | | | branchname | text | | | | | | branchaddress1 | text | YES | | NULL | | | branchaddress2 | text | YES | | NULL | | | branchaddress3 | text | YES | | NULL | | | branchphone | text | YES | | NULL | | | branchfax | text | YES | | NULL | | | branchemail | text | YES | | NULL | | | issuing | tinyint(4) | YES | | NULL | | +----------------+------------+------+-----+---------+-------+ 9 rows in set
DESCRIBE branchcategories; +-----------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+------------+------+-----+---------+-------+ | categorycode | varchar(4) | | PRI | | | | categoryname | text | YES | | NULL | | | codedescription | text | YES | | NULL | | +-----------------+------------+------+-----+---------+-------+ 3 rows in set
DESCRIBE branchrelations; +--------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+------------+------+-----+---------+-------+ | branchcode | varchar(4) | YES | | NULL | | | categorycode | varchar(4) | YES | | NULL | | +--------------+------------+------+-----+---------+-------+ 2 rows in set
The branches table holds descriptive data about individual branches, while the branchcategories table contains basic information about the types of branches the library has. The branchrelations table relates the other two tables, effectively assigning each branch to a category.
Seven other tables contain data used for cataloging library materials:
DESCRIBE itemtypes; +-----------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+-------+ | itemtype | varchar(4) | | PRI | | | | description | text | YES | | NULL | | | renewalsallowed | smallint(6) | YES | | NULL | | | rentalcharge | double(16,4) | YES | | NULL | | | notforloan | smallint(6) | YES | | NULL | | +-----------------+--------------+------+-----+---------+-------+ 5 rows in set
DESCRIBE marc_tag_structure; +------------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+------------+------+-----+---------+-------+ | tagfield | char(3) | | PRI | | | | liblibrarian | char(255) | | | | | | libopac | char(255) | | | | | | repeatable | tinyint(4) | | | 0 | | | mandatory | tinyint(4) | | | 0 | | | authorised_value | char(10) | YES | | NULL | | | frameworkcode | char(4) | | PRI | | | +------------------+------------+------+-----+---------+-------+ 7 rows in set
DESCRIBE marc_subfield_structure; +------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+--------------+------+-----+---------+-------+ | tagfield | char(3) | | PRI | | | | tagsubfield | char(1) | | PRI | | | | liblibrarian | varchar(255) | | | | | | libopac | varchar(255) | | | | | | repeatable | tinyint(4) | | | 0 | | | mandatory | tinyint(4) | | | 0 | | | kohafield | varchar(40) | YES | MUL | NULL | | | tab | tinyint(1) | YES | | NULL | | | authorised_value | varchar(10) | YES | | NULL | | | authtypecode | varchar(10) | YES | | NULL | | | value_builder | varchar(80) | YES | | NULL | | | isurl | tinyint(1) | YES | | NULL | | | hidden | tinyint(1) | YES | | NULL | | | frameworkcode | varchar(4) | | PRI | | | | seealso | varchar(255) | YES | | NULL | | | link | varchar(80) | YES | | NULL | | +------------------+--------------+------+-----+---------+-------+ 16 rows in set
DESCRIBE biblio_framework; +---------------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+-----------+------+-----+---------+-------+ | frameworkcode | char(4) | | PRI | | | | frameworktext | char(255) | | | | | +---------------+-----------+------+-----+---------+-------+ 2 rows in set
DESCRIBE authorised_values; +------------------+----------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------------+----------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | category | char(10) | | MUL | | | | authorised_value | char(80) | | | | | | lib | char(80) | YES | | NULL | | +------------------+----------+------+-----+---------+----------------+ 4 rows in set
DESCRIBE auth_types; +--------------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------------+--------------+------+-----+---------+-------+ | authtypecode | varchar(10) | | PRI | | | | authtypetext | varchar(255) | | | | | | auth_tag_to_report | char(3) | | | | | | summary | text | | | | | +--------------------+--------------+------+-----+---------+-------+ 4 rows in set
DESCRIBE auth_tag_structure; +------------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+------------+------+-----+---------+-------+ | authtypecode | char(10) | | PRI | | | | tagfield | char(3) | | PRI | | | | liblibrarian | char(255) | | | | | | libopac | char(255) | | | | | | repeatable | tinyint(4) | | | 0 | | | mandatory | tinyint(4) | | | 0 | | | authorised_value | char(10) | YES | | NULL | | +------------------+------------+------+-----+---------+-------+ 7 rows in set
DESCRIBE auth_subfield_structure; +------------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------+------------+------+-----+---------+-------+ | authtypecode | char(10) | | PRI | | | | tagfield | char(3) | | PRI | | | | tagsubfield | char(1) | | PRI | | | | liblibrarian | char(255) | | | | | | libopac | char(255) | | | | | | repeatable | tinyint(4) | | | 0 | | | mandatory | tinyint(4) | | | 0 | | | tab | tinyint(1) | YES | | NULL | | | authorised_value | char(10) | YES | | NULL | | | value_builder | char(80) | YES | | NULL | | | seealso | char(255) | YES | | NULL | | +------------------+------------+------+-----+---------+-------+ 11 rows in set
The itemtypes table holds information about the categories of library materials. As you can see, some very important information controlling circulation of each type of item is contained in this table.
The marc_tag_structure and marc_subfield_structure tables control how Koha displays MARC tags and subfields to the catalogers, and also store the links between MARC subfields and some of the tables containing bibliographic data. The data in these tables is extended or modified whenever the Koha user edits the "Biblio Frameworks." The names of the Biblio Frameworks themselves are stored in the biblio_framework table.
The remaining four tables hold data controlling the display and use of pull-down menus of authorized values for cataloging, and of authority records. Most of this data is modified whenever the Koha user edits the "Thesaurus Structure."
Four more tables primarily hold data used in the course of purchasing library materials:
DESCRIBE currency; +----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+-------+ | currency | varchar(10) | YES | | NULL | | | rate | float(7,5) | YES | | NULL | | +----------+-------------+------+-----+---------+-------+ 2 rows in set
DESCRIBE aqbookfund; +---------------+------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------------+------------+------+-----+---------+-------+ | bookfundid | varchar(5) | | PRI | '' | | | bookfundname | text | YES | | NULL | | | bookfundgroup | varchar(5) | YES | | NULL | | | branchcode | varchar(4) | YES | | NULL | | +---------------+------------+------+-----+---------+-------+ 4 rows in set
DESCRIBE aqbudget; +--------------+---------------+------+-----+------------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------------+---------------+------+-----+------------+----------------+ | bookfundid | varchar(5) | | | | | | startdate | date | | | 0000-00-00 | | | enddate | date | YES | | NULL | | | budgetamount | decimal(13,2) | YES | | NULL | | | aqbudgetid | tinyint(4) | | PRI | NULL | auto_increment | | branchcode | varchar(4) | YES | | NULL | | +--------------+---------------+------+-----+------------+----------------+ 6 rows in set
DESCRIBE aqbooksellers; +-----------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | | name | text | YES | | NULL | | | address1 | text | YES | | NULL | | | address2 | text | YES | | NULL | | | address3 | text | YES | | NULL | | | address4 | text | YES | | NULL | | | phone | varchar(30) | YES | | NULL | | | accountnumber | text | YES | | NULL | | | othersupplier | text | YES | | NULL | | | currency | char(3) | | | | | | deliverydays | smallint(6) | YES | | NULL | | | followupdays | smallint(6) | YES | | NULL | | | followupscancel | smallint(6) | YES | | NULL | | | specialty | text | YES | | NULL | | | booksellerfax | text | YES | | NULL | | | notes | text | YES | | NULL | | | bookselleremail | text | YES | | NULL | | | booksellerurl | text | YES | | NULL | | | contact | varchar(100) | YES | | NULL | | | postal | text | YES | | NULL | | | url | varchar(255) | YES | | NULL | | | contpos | varchar(100) | YES | | NULL | | | contphone | varchar(100) | YES | | NULL | | | contfax | varchar(100) | YES | | NULL | | | contaltphone | varchar(100) | YES | | NULL | | | contemail | varchar(100) | YES | | NULL | | | contnotes | text | YES | | NULL | | | active | tinyint(4) | YES | | NULL | | | listprice | varchar(5) | YES | | NULL | | | invoiceprice | varchar(5) | YES | | NULL | | | gstreg | tinyint(4) | YES | | NULL | | | listincgst | tinyint(4) | YES | | NULL | | | invoiceincgst | tinyint(4) | YES | | NULL | | | discount | float(6,4) | YES | | NULL | | | fax | varchar(50) | YES | | NULL | | | nocalc | int(11) | YES | | NULL | | | invoicedisc | float(6,4) | YES | | NULL | | +-----------------+--------------+------+-----+---------+-------+ 37 rows in set
The currency table keeps track of the exchange rates between the various currencies which the library might encounter when purchasing materials. The aqbookfund and aqbudget tables hold Acquisitions accounting data, establishing various general funds for purchasing materials, as well as more specific budgets related to a certain time period or library branch. The aqbooksellers table holds information about the vendors the library buys from.
Various other tables holding descriptive data function independently of other tables:
DESCRIBE systempreferences; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | variable | varchar(50) | | PRI | | | | value | text | YES | | NULL | | | options | text | YES | | NULL | | | explanation | varchar(80) | YES | | NULL | | | type | varchar(20) | YES | | NULL | | +-------------+-------------+------+-----+---------+-------+ 5 rows in set
The systempreferences table holds the system preferences that are defined through the Koha Parameters page. Many Koha scripts begin by checking this table to check for preferred behaviors.
DESCRIBE issuingrules; +----------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------------+---------------+------+-----+---------+-------+ | categorycode | char(2) | | PRI | | | | itemtype | varchar(4) | | PRI | | | | restrictedtype | tinyint(1) | YES | | NULL | | | rentaldiscount | decimal(28,6) | YES | | NULL | | | reservecharge | decimal(28,6) | YES | | NULL | | | fine | decimal(28,6) | YES | | NULL | | | firstremind | int(11) | YES | | NULL | | | chargeperiod | int(11) | YES | | NULL | | | accountsent | int(11) | YES | | NULL | | | chargename | varchar(100) | YES | | NULL | | | maxissueqty | int(4) | YES | | NULL | | | issuelength | int(4) | YES | | NULL | | | branchcode | varchar(4) | | PRI | | | +----------------+---------------+------+-----+---------+-------+ 13 rows in set
The issuingrules table controls loan lengths, fine accruals, and other aspects of circulating library materials, cross-referencing by item type, borrower category, and library branch. The data is this table is modified through the "Issuing Rules" link from the Parameters page.
DESCRIBE stopwords; +-------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------+------+-----+---------+-------+ | word | varchar(255) | YES | | NULL | | +-------+--------------+------+-----+---------+-------+ 1 row in set
The stopwords table is very simple, yet very important. This table contains the words which Koha will ignore when searching the catalogue for terms entered by a user. At least one stop word must be defined (through the "Stopwords" link on the Parameters page) before Koha will function properly.
DESCRIBE users; +----------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+-------+ | usercode | varchar(10) | YES | | NULL | | | username | text | YES | | NULL | | | password | text | YES | | NULL | | | level | smallint(6) | YES | | NULL | | +----------+-------------+------+-----+---------+-------+ 4 rows in set
The users table is actually an artifact from earlier versions of Koha; it does not seem to be used at all in version 2.2.4.
DESCRIBE printers; +-------------+----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+----------+------+-----+---------+-------+ | printername | char(40) | | PRI | '' | | | printqueue | char(20) | YES | | NULL | | | printtype | char(20) | YES | | NULL | | +-------------+----------+------+-----+---------+-------+ 3 rows in set
The printers table holds descriptive information about your system printers. Note that Koha does nothing with printers attached to client machines -- they are handled by the web browser on the client computer.
DESCRIBE z3950servers; +----------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+--------------+------+-----+---------+----------------+ | host | varchar(255) | YES | | NULL | | | port | int(11) | YES | | NULL | | | db | varchar(255) | YES | | NULL | | | userid | varchar(255) | YES | | NULL | | | password | varchar(255) | YES | | NULL | | | name | text | YES | | NULL | | | id | int(11) | | PRI | NULL | auto_increment | | checked | smallint(6) | YES | | NULL | | | rank | int(11) | YES | | NULL | | | syntax | varchar(80) | YES | | NULL | | +----------+--------------+------+-----+---------+----------------+ 10 rows in set
The z3950servers holds the descriptions and login information for the Z3950 servers you wish to access when creating MARC catalogue records.
Three final descriptive tables will lead us into the borrower data:
DESCRIBE categories; +-----------------------+---------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------------------+---------------+------+-----+---------+-------+ | categorycode | char(2) | | PRI | | | | description | text | YES | | NULL | | | enrolmentperiod | smallint(6) | YES | | NULL | | | upperagelimit | smallint(6) | YES | | NULL | | | dateofbirthrequired | tinyint(1) | YES | | NULL | | | finetype | varchar(30) | YES | | NULL | | | bulk | tinyint(1) | YES | | NULL | | | enrolmentfee | decimal(28,6) | YES | | NULL | | | overduenoticerequired | tinyint(1) | YES | | NULL | | | issuelimit | smallint(6) | YES | | NULL | | | reservefee | decimal(28,6) | YES | | NULL | | +-----------------------+---------------+------+-----+---------+-------+ 11 rows in set
DESCRIBE ethnicity; +-------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+--------------+------+-----+---------+-------+ | code | varchar(10) | | PRI | | | | name | varchar(255) | YES | | NULL | | +-------+--------------+------+-----+---------+-------+ 2 rows in set
DESCRIBE userflags; +-----------+-----------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-----------+-----------+------+-----+---------+-------+ | bit | int(11) | | | 0 | | | flag | char(30) | YES | | NULL | | | flagdesc | char(255) | YES | | NULL | | | defaulton | int(11) | YES | | NULL | | +-----------+-----------+------+-----+---------+-------+ 4 rows in set
The categories table holds the data describing the characteristics of the library's categories of borrowers.
The ethnicity table holds the names of the ethnic groups to which the library's borrowers belong (if the library is required to keep such data). Note that Koha 2.2.4 does not provide an interface for loading the ethnicity table or saving ethnicity data about borrowers, but the code still contains the capability of saving such data if the HTML templates are altered to allow its entry.
The usersflags table hold the meanings of the borrowers' permission flags. In other words, if the "borrower" is actually a librarian using the Intranet, Koha checks the user "flags" set for that person and consults this table to control what tasks the person may perform on the system. The data in this table is generally controlled by the Koha developers and should not be changed by the user.