The document creates three database tables - Worker, Bonus, and Title. The Worker table stores employee data like ID, name, salary, etc. The Bonus table links bonuses to workers via their ID. The Title table tracks employees' job titles and the dates they became effective. The document then populates the tables with sample data by inserting worker, bonus, and title records.
The document creates three database tables - Worker, Bonus, and Title. The Worker table stores employee data like ID, name, salary, etc. The Bonus table links bonuses to workers via their ID. The Title table tracks employees' job titles and the dates they became effective. The document then populates the tables with sample data by inserting worker, bonus, and title records.
The document creates three database tables - Worker, Bonus, and Title. The Worker table stores employee data like ID, name, salary, etc. The Bonus table links bonuses to workers via their ID. The Title table tracks employees' job titles and the dates they became effective. The document then populates the tables with sample data by inserting worker, bonus, and title records.
INSERT INTO Bonus (WORKER_REF_ID, BONUS_AMOUNT, BONUS_DATE) VALUES(001, 5000,
To_date('2023-02-20','YYYY-MM-DD')); INSERT INTO Bonus VALUES (002, 3000, To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Bonus VALUES (003, 4000, To_date('2023-02-20','YYYY-MM-DD')); INSERT INTO Bonus VALUES(001, 4500, To_date('2023-02-20','YYYY-MM-DD')); INSERT INTO Bonus VALUES(002, 3500, To_date('2023-06-11','YYYY-MM-DD'));
INSERT INTO Title (WORKER_REF_ID, WORKER_TITLE, AFFECTED_FROM) VALUES
(001, 'Manager',To_date('2023-02-20','YYYY-MM-DD')); INSERT INTO Title VALUES (002, 'Executive',To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Title VALUES (008, 'Executive',To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Title VALUES(005, 'Manager',To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Title VALUES(004, 'Asst. Manager',To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Title VALUES(007, 'Executive', To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Title VALUES(006, 'Lead',To_date('2023-06-11','YYYY-MM-DD')); INSERT INTO Title VALUES(003, 'Lead',To_date('2023-06-11','YYYY-MM-DD'));