Introduction to Databases
Types (Hierarchical, Relational, Non-Relational) and Indexes
Tamara Marnell, Orbis Cascade Alliance
In This Lesson
https://github.orbiscascade.org/systems-librarianship/databases
Database Types
Hierarchical
Relational
Example queries
Look up information in one table based off a value in another:
SELECT repos.name, repos.url
-> FROM repos JOIN arks ON repos.id=arks.repo_id
-> WHERE arks.ark="80444/xv605573";
+--------------------------------------------+-------------------------------------+
| name | url |
+--------------------------------------------+-------------------------------------+
| Oregon Historical Society Research Library | http://ohs.org/research-and-library |
+--------------------------------------------+-------------------------------------+
Example queries
Get data from tables without a direct link between them:
SELECT repos.name, COUNT(DISTINCT views.ark) as arks, SUM(views.count) as total
-> FROM (repos JOIN arks ON repos.id=arks.repo_id)
-> JOIN views ON arks.ark=views.ark
-> WHERE repos.name LIKE "University of Washington %"
-> AND views.date BETWEEN "2024-10-01" AND "2024-10-31"
-> GROUP BY repos.name;
+---------------------------------------------------------+------+-------+
| name | arks | total |
+---------------------------------------------------------+------+-------+
| University of Washington Ethnomusicology Archives | 1062 | 1723 |
| University of Washington Libraries, Media Archive | 4 | 14 |
| University of Washington Libraries, Special Collections | 2848 | 14204 |
+---------------------------------------------------------+------+-------+
Non-Relational
Document Database Programs
Indexes
What are indexes?
academic libraries, 42–44, 67, 109
access
alternate strategies of, 101–103
definition of, 8–9
establishing, as core competency, 7, 10, 24–25, 43–44, 103, 112–113
ownership and, 44–46
potential for, 76–77
strategic assemblages of, 43–51
vendors and, 28–37
acquisitions
archives and, 103–106
as an assemblage, 7, 12–13, 50–51, 57–58, 80, 99–103, 110–116
changing nature of, 21–24, 75–81, 103, 114–116
core competencies in, 7, 10, 24–25, 103, 112–113
definition of, 6–9
linearity and, 24, 26–27, 29, 48, 54–55, 113–115
professional standards for, 14–15, 29–30, 34–37, 77, 95
radicalization of, 15–17, 110–116
rhizomatic approach to, 115–116
role of, 15–17, 24–27, 49–51, 54–58, 72–75, 95–97, 104–105
Indexing in Archives West
Example of a subject facet index
<terms db="18">
<term text="Advertising and Marketing">
<ark>80444/xv44537</ark>
<ark>80444/xv33883</ark>
</term>
<term text="Agriculture">
<ark>80444/xv32205</ark>
</term>
<term text="Arab Americans">
<ark>80444/xv87927</ark>
</term>
<term text="Artifacts">
<ark>80444/xv76818</ark>
</term>
<term text="Astoria">
<ark>80444/xv83142</ark>
</term>
(...)
</terms>
Real-world troubleshooting
Any platform with a search interface likely queries indexes rather than the source records in MARC, Dublin Core, EAD, etc.
Examples of issues that may come up: