What stands out in Datasette
A SQLite file is a convenient handoff for someone who writes queries. Datasette gives the same collection a browser interface for someone who just wants to find a record. A table page makes a good starting point for a small archive when building a custom website would take longer than assembling the collection.
Walkthrough
- Download catalog.db, a fictional tool-lending catalog with six records. With Datasette installed, run datasette catalog.db from the file's directory. Follow the local URL printed by the command. Pick the tools table in the catalog database.
- Read across the first few records. The location and condition columns answer different questions. Facet the table by location and choose East desk. Three tools are assigned there. Keep the filtered table visible while checking whether the inventory description is useful to a visitor.
- Add a condition filter for ready. Two records at East desk should remain. Open one record by its primary key to see the difference between a specific item and a filtered list that might return different items after a database update.
- Copy the filtered page URL and reopen it in a second tab on the same machine. The filter choices travel in the link. A localhost address points to the reader's own computer, so this exercise prepares a view for review rather than publishing an archive to the internet.
Field tip
Prefer a stable identifier such as tool_id for references to individual items. A descriptive name can be corrected without changing which physical item the record describes. Two identical clamp names in different bins are legitimate.
Where it falls short
Inspect every table and field before putting a database on a public host. A nice default view does not remove fields from the underlying file. Build a separate publication copy containing only material intended for readers.
Try it yourself
A volunteer at East desk needs a list of ready items and a way to identify the one needing service. The unfiltered location view has three items. Filtering to ready leaves two. Clear the condition filter to recover the missing record and read its service label.