-
Notifications
You must be signed in to change notification settings - Fork 1
ERD
Eunji LEE edited this page Jun 27, 2026
·
11 revisions
Django + Next.js · Adzuna API
This document defines the schema for data the app owns. Live job postings from Adzuna are not stored as tables — they live in Django's cache (TTL) and are refetched from Adzuna when they expire.
| Type | What | How it's kept |
|---|---|---|
| Stored in DB | Accounts, favourites, saved searches, daily analytics | Permanent tables |
| Cached, not stored | Live job listings, salary histograms, regional / trend data | Django cache (refetched from Adzuna on TTL expiry) |
Adzuna postings only sit in the cache briefly, but CSV postings must be stored permanently, so a separate table is required.
FAVOURITE_JOBScan't be reused because it's per-user data.
Once CSV postings are stored in the DB, the listings shown on screen come from two sources:
- The
JOB_POSTINGStable (our postings) - The Adzuna cache (external postings)
So decide up front how the frontend (JobList.js) merges them:
- Merge into one list → needs combining logic in the backend
- Split into tabs → "External postings" / "Our postings"
- User data is one-to-many — one USERS row owns many FAVOURITE_JOBS and SAVED_SEARCHES rows.
- Analytics stands alone — DEMAND_SNAPSHOTS has no user link; it's global data built by a daily job.
-
Adzuna postings are cached, not modeled — the DB only holds data you own. Only CSV postings are stored, in
JOB_POSTINGS.