A summary of database entities and their relationships in the context-based news retrieval system:
Entity | Primary Key | Relationship | Main Purpose | Key Attributes |
---|---|---|---|---|
news_articles | id (uuid) | Parent table | Stores core news article data | title, url, publication_date, relevance_score, geo_point |
llm_mapping | id (uuid) | 1:1 with news_articles | Stores AI-generated summaries | llm_summary |
user_events | id (uuid) | N:1 with news_articles | Tracks user interactions | article_id, event_type, user location, event_timestamp |
news_articles
Columns
id
(uuid, PK, not null)title
(varchar(255), not null)description
(text)url
(varchar(1000), not null)publication_date
(timestamp, not null)source_name
(varchar(255), not null)category
(text[], not null)relevance_score
(double precision, not null)latitude
(double precision)longitude
(double precision)geo_point
(geography(Point, 4326))Indexes
news_articles_pkey
→ primary key on (id)