The document discusses Koha's use of SQL and database structure. It notes that Koha uses a SQL baseline file and update file to define its version and structure. While Koha's database contains over 125 tables and 1,773 lines of XML code when dumped, tools like phpMyAdmin, MySQL Administrator and MySQL Query Browser can be used to view and manage the database. The document also outlines some of Koha's adherence to and deviations from best practices for database design, and lists some of its core tables like systempreferences, branches, borrowers and biblio.
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