A comprehensive Database Management System designed for a modern Journalism Agency, featuring complex PL/SQL logic, audit mechanisms, and editorial workflow automation.
This project simulates the backend infrastructure of a News Agency. It manages the complete lifecycle of editorial content: from Users (Authors, Editors, Readers) and Articles to Feedback and Reading History.
The system is built to ensure data integrity not just through constraints, but through advanced business logic implemented via Triggers and Stored Procedures.
The database utilizes a relational model with 1:1(0) ISA Hierarchies for user roles and Many-to-Many relationships for tagging and authorship.
The project implements advanced Oracle Database concepts:
- Conflict of Interest Prevention (Row-Level Trigger): Prevents authors from rating their own articles.
- Workflow Validation: Ensures a user cannot leave feedback unless they have a verified record in the
Reading_Historytable. - Audit System (Statement-Level Trigger): Logs all
INSERT,UPDATE, orDELETEoperations on the Articles table for security monitoring. - Schema Protection (DDL Trigger): Automatically logs any structural changes (
CREATE,ALTER,DROP) to the database schema.
pkg_analiza_editoriala: A comprehensive package that encapsulates:- Custom Records: Defined
t_articolrecord type for optimized data handling. - Functions: Algorithms to calculate "Event Popularity" based on tag aggregation.
- Procedures: Dynamic reports for "Premium" vs. "Standard" content access based on user subscription type.
- Custom Records: Defined
- Collections: Utilized
VARRAYfor fixed configuration (Target Categories),NESTED TABLESfor dynamic article lists, andASSOCIATIVE ARRAYSfor high-speed status lookups. - Cursors: Implemented Parameterized Cursors to generate hierarchical reports (Category -> Articles) efficiently.
- Managed standard exceptions (
NO_DATA_FOUND,TOO_MANY_ROWS). - Defined and raised User-Defined Exceptions for business rule violations (e.g.,
exc_reputatie_slabafor low-rated authors).