A look at Koha’s internal database structure using the mysql command-line. This isn’t to teach you SQL, but where to look in Koha tables for relevant data. - Joe Atzberger
6. SQL Control
•mysqldump --no-data --xml
-uyouruser -pyourpass koha_db
>dump.sql
•~125 tables
•~1773 lines of XML
So what do you use to
look at it all?
•That is a lot of stuff.
7. SQL Tools
• phpMyAdmin: web based table control, a
great way to break everything and not be
able to fix it. I once performed a tech
inventory for the State
• MySQL Administrator, MySQL Query
of Ohio in one of its
smaller departments.
The single largest line
item was $427,000 for 7
Browser: Free and “official”. boxes of Oracle soft ware.
• Tons of OSS applications. Varying quality.
• Tons of proprietary software. Varying cost.
8. DB Design Principles
• Limit duplication of values
• Put related data together
• Proper data typing
• Keys, indexes, etc., etc., etc.
13. DB Design Problems
• MARC: not a relational design.
• MARC: limits on record dimensions.
• MARC: performance implications.
• Battle of MARCs. Legacy code and data.
• FRBR, holdings, bindings, serials, etc.
• Excuses, excuses, excuses...
16. Core tables
• systempreferences: system preferences
• branches: the most frequently keyed table
17. Core tables
• systempreferences: system preferences
• branches: the most frequently keyed table
• borrowers: users, patrons, staff, people, whomever
18. Core tables
• systempreferences: system preferences
• branches: the most frequently keyed table
• borrowers: users, patrons, staff, people, whomever
• biblio: title level
19. Core tables
• systempreferences: system preferences
• branches: the most frequently keyed table
• borrowers: users, patrons, staff, people, whomever
• biblio: title level
• biblioitems: marc & marcxml, going away soon
20. Core tables
• systempreferences: system preferences
• branches: the most frequently keyed table
• borrowers: users, patrons, staff, people, whomever
• biblio: title level
• biblioitems: marc & marcxml, going away soon
• items: where the barcodes live
21. Parallel tables
• deletedxxx: biblios, items, biblioitems,
borrowers
• old_xxx: old_issues, old_reserves. Need
more.
22. Black Magicks
You won’t be importing to
any of these tables.
Very application specific.
• marc_subfield_structure
• marc_tag_structure