0% found this document useful (0 votes)
20 views

Base Schema SQL Code

The document discusses various Oracle PL/SQL concepts including DDL and DML commands, control flow statements, data collections, exception handling, cursors, functions, procedures, packages, and triggers. Specific examples provided include using a package to add, remove, and list students and art pieces with related data, finding the total cost of materials for an art piece using a function, and increasing student scholarships based on art sales.

Uploaded by

Cristi Barna
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Base Schema SQL Code

The document discusses various Oracle PL/SQL concepts including DDL and DML commands, control flow statements, data collections, exception handling, cursors, functions, procedures, packages, and triggers. Specific examples provided include using a package to add, remove, and list students and art pieces with related data, finding the total cost of materials for an art piece using a function, and increasing student scholarships based on art sales.

Uploaded by

Cristi Barna
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

 DDL & DML commands using execute immediate

 IF, CASE, FOR, LOOP, WHILE


 Data collections (index by table, nested table (1), varray)
 Exception handling:
- 3 implicit (1/3)
- 2 explicit (1/2)
 Cursor management (with & w/o parameters):
- implicit
- explicit
 Functions (1/3)
 Procedures (3/3)
 A package that includes different functions and procedures
 Triggers at statement level (2)
 Triggers at row level (2)

Statement ideas:

- From oracle tutorials index-by tables example (explicit cursor, loop, while)

- 3. From oracle tutorials cursors: increase salary or scholarship using IMPLICIT cursor and using sql
%rowcount to see how many rows have been affected. Increase the bonus with 500 of those staff
members whose bonus is null. Show how many staff members were affected.

DECLARE
total_rows number(2);
BEGIN
UPDATE STAFF
SET bonus = 500
WHERE bonus IS NULL;
IF sql%found THEN
total_rows := sql%rowcount;
dbms_output.put_line( total_rows || ' staff members selected ');
END IF;

EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line('All staff members already have bonuses!');
WHEN others THEN
dbms_output.put_line('Error!');

END;
/
- Package from the package tut to display salary of a staff member by entering the id
========================Package specification==========================================

CREATE OR REPLACE PACKAGE stud_package AS


-- Adds a student
PROCEDURE addStudent(s_id students.id_stud_pk%type,
s_name students.stud_name%type,
s_surname students.surname%type,
s_email students.email%type,
s_scholarship students.scholarship%type,
s_en_date students.enrollment_date%type);

PROCEDURE addArtPiece(ap_id art_pieces.id_art_pk%type,


ap_id_stud art_pieces.id_stud_fk%type,
ap_fin_date art_pieces.finish_date%type,
ap_art_form art_pieces.art_form%type,
ap_current art_pieces.artistic_current%type);

PROCEDURE addMatReg(mr_id_mat material_register.id_material_fk%type,


mr_id_art material_register.id_art_fk%type,
mr_quantity material_register.quantity_used%type,
mr_un_measure material_register.unit_of_measure%type,
mr_date material_register.date_of_usage%type);

-- Removes an art piece


PROCEDURE delArtPiece(ap_id art_pieces.id_art_pk%TYPE);

--Lists all students


PROCEDURE listStudent;

END stud_package;
/

===========Package body=========================================================

CREATE OR REPLACE PACKAGE BODY stud_package AS


PROCEDURE addStudent(s_id students.id_stud_pk%type,
s_name students.stud_name%type,
s_surname students.stud_surname%type,
s_email students.email%type,
s_scholarship students.scholarship%type,
s_en_date students.enrollment_date%type)
IS
BEGIN
INSERT INTO students (id_stud_pk, stud_name, stud_surname, email, scholarship,
enrollment_date)
VALUES(s_id, s_name, s_surname, s_email, s_scholarship, s_en_date);
END addStudent;

PROCEDURE addArtPiece(ap_id art_pieces.id_art_pk%type,


ap_id_stud art_pieces.id_stud_fk%type,
ap_fin_date art_pieces.finish_date%type,
ap_art_form art_pieces.art_form%type,
ap_current art_pieces.artistic_current%type) IS
BEGIN
INSERT INTO art_pieces (id_stud_fk, finish_date, art_form, artistic_current)
VALUES(ap_id_stud, ap_fin_date, ap_art_form, ap_current);
END addArtPiece;

PROCEDURE addMatReg(mr_id_mat material_register.id_material_fk%type,


mr_id_art material_register.id_art_fk%type,
mr_quantity material_register.quantity_used%type,
mr_un_measure material_register.unit_of_measure%type,
mr_date material_register.date_of_usage%type) IS
BEGIN
INSERT INTO material_register (id_material_fk, id_art_fk, quantity_used, unit_of_measure,
date_of_usage)
VALUES(mr_id_mat, mr_id_art, mr_quantity, mr_un_measure, mr_date);
END addMatReg;

PROCEDURE delArtPiece(ap_id art_pieces.id_art_pk%TYPE) IS


BEGIN
DELETE FROM art_pieces
WHERE id_art_pk = ap_id;
END delArtPiece;

PROCEDURE listStudent IS
CURSOR c_students is
SELECT stud_name, stud_surname FROM students;
TYPE s_list is TABLE OF students.stud_name%type;
full_name_list s_list := s_list();
aux integer :=0;
BEGIN
FOR n IN c_students LOOP
aux := aux +1;
full_name_list.extend;
full_name_list(aux) := n.stud_name||’ ‘||n.stud_surname;
dbms_output.put_line('Student(' ||aux|| ')'||name_list(aux));
END LOOP;
END listStudent;

END stud_package;
/

=================Package calls==========================================
DECLARE
x art_pieces.id_art_pk%type:= 100011;
BEGIN
stud_package.addStudent(220, 'Andrew', 'Lincoln', ’[email protected]’, 300,
’02/10/2023’);
stud_package.addArtPiece(100022, 220, 05/08/2023, 'oil portrait', 'naturalism');
stud_package.addMatReg(’m09’, 100022, 1, ’piece’, ’04/13/2023’ );
stud_package.addMatReg(’m01’, 100022, 5, ’piece’, ’04/13/2023’ );
stud_package.addMatReg(’m04’, 100022, 11, ’tube’, ’04/13/2023’ );
stud_package.delArtPiece(x);
stud_package.listStudents;
END;
/

- 4. Find out the total cost of the materials used to create a specific art piece.

CREATE OR REPLACE FUNCTION get_production_cost(a_id IN NUMBER)


RETURN NUMBER
IS
total_cost NUMBER;
BEGIN
SELECT SUM(price_per_unit) INTO total_cost
FROM materials m, material_register mr
WHERE mr.id_art_fk = a_id AND mr.id_material_fk = m.id_material_pk;
RETURN total_cost;

EXCEPTION
WHEN no_data_found THEN
dbms_output.put_line(’No art piece found.’);
WHEN others THEN
dbms_output.put_line(’Error!’);
END;
END get_production_cost;

============== CALL OF THE FUNCTION=================


DECLARE
tc number;
BEGIN
tc:=get_production_cost(100003);
dbms_output.put_line(‘The cost of the materials used for this art piece is’ || tc);
END;
/

- How many art pieces were sold at an exposition and increase the scholarship of those students
whose art pieces sold for more than the average price of all sold art pieces from all expositions
(can be an exception if there are no such students)

CREATE OR REPLACE FUNCTION avg_sold_art_value


RETURN NUMBER IS
avrg NUMBER;
BEGIN
SELECT AVG(price_sold) INTO avrg
FROM exhibit_list
WHERE status IS NOT NULL;

END;

CREATE OR REPLACE TRIGGER scholarship_changes


BEFORE DELETE OR INSERT OR UPDATE ON students
FOR EACH ROW
WHEN (NEW.id_stud_pk > 0)
DECLARE
sch_diff number;
BEGIN
sch_diff := :NEW.scholarship – :OLD.scholarship;
dbms_output.put_line(‘Old scholarship: ’ || :OLD.scholarship);
dbms_output.put_line(‘New scholarship: ’|| :NEW.scholarship);
dbms_output.put_line(‘Scholarship difference: ’|| sch_diff);
END;

CREATE OR REPLACE TRIGGER salary_changes


BEFORE DELETE OR INSERT OR UPDATE ON staff
FOR EACH ROW
WHEN (NEW.id_staff_pk > 0)
DECLARE
sal_diff number;
BEGIN
sal_diff := :NEW.salary – :OLD.salary;
dbms_output.put_line(‘Old salary: ’ || :OLD.salary);
dbms_output.put_line(‘New salary: ’|| :NEW.salary);
dbms_output.put_line(‘Salary difference: ’|| sal_diff);
END;

INSERT INTO STAFF(id_staff_pk, staff_name, staff_surname, email, specialisation, salary, bonus)


VALUES(219, 'James', 'Clark', '[email protected]', 'detail enhancement', 4700, 300);

UPDATE staff
SET salary = 5379
WHERE id_staff_pk = 219;

UPDATE students
SET scholarship = 5783
WHERE id_stud_pk = 206;

CREATE OR REPLACE FUNCTION checkIfHigherThanAvg(id_stud students.id_stud_pk%type)


RETURN NUMBER IS
ps NUMBER;
DECLARE
avrg := avgSoldArtValue();

BEGIN

SELECT price_sold, id_art_pk, id_art_fk, id_stud_pk, id_stud_fk


FROM exhibit_list e, art_pieces a, students s
WHERE e.id_art_fk = a.id_art_pk AND a.id_stud_fk=s.id_stud_pk AND price_sold IS NOT NULL;

IF price_sold > avrg THEN


UPDATE students
SET scholarship = scholarship + 1000
WHERE e.id_art_fk = a.id_art_pk AND a.id_stud_fk=s.id_stud_pk
ELSIF no_data_found THEN
Dbms_output.put_line(‘No such data found.’)
END;
/

CREATE TABLE Staff(


id_staff_member NUMBER(3) CONSTRAINT pk_staff_member PRIMARY KEY,
staff_name VARCHAR2(20),
staff_surname VARCHAR2(20),
email VARCHAR2(30) UNIQUE,
specialisation VARCHAR2(30),
salary NUMBER(6) NOT NULL,
bonus NUMBER(6),
CONSTRAINT checkk_email CHECK(email LIKE '%@%.%')
);

CREATE TABLE Students(


id_stud NUMBER(3) CONSTRAINT pk_stud PRIMARY KEY,
stud_name VARCHAR2(20),
stud_surname VARCHAR2(20),
email VARCHAR(30) UNIQUE,
scholarship NUMBER(4),
enrollment_date DATE
);

CREATE TABLE Classes(


class_name VARCHAR2(20),
min_required_hours NUMBER(2),
hours_per_week NUMBER(2),
id_stud NUMBER(3) CONSTRAINT fk_stud REFERENCES Students(id_stud),
id_staff_member NUMBER(3) CONSTRAINT fk_staff_member REFERENCES Staff(id_staff_member)
);

CREATE TABLE Art_pieces(


id_art_piece NUMBER(6) CONSTRAINT pk_art_piece PRIMARY KEY,
id_stud NUMBER(3) CONSTRAINT fk_stud_art_piece REFERENCES Students(id_stud),
finish_date DATE,
art_form VARCHAR2(20) NOT NULL,
artistic_current VARCHAR2(30) NOT NULL
);

CREATE TABLE Exhibitions(


id_exhibitions VARCHAR2(10) CONSTRAINT pk_exhibition PRIMARY KEY,
exhibition_name VARCHAR2(30),
frequency VARCHAR2(20),
address VARCHAR2(40),
event_date VARCHAR2(20)
);

CREATE TABLE Exhibit_lists(


id_art_piece NUMBER(6) CONSTRAINT fk_exh_art_piece REFERENCES Art_pieces(id_art_piece),
id_exhibition VARCHAR2(10) CONSTRAINT fk_exh_list REFERENCES Exhibitions(id_exhibitions),
event_date DATE,
status VARCHAR2(20) NOT NULL,
price_sold NUMBER(6)
);

CREATE TABLE Materials(


id_material VARCHAR2(10) CONSTRAINT pk_material PRIMARY KEY,
article_name VARCHAR2(30),
brand VARCHAR2(30),
in_stock NUMBER(3),
price_per_unit NUMBER(4)
);

CREATE TABLE Material_registers(


id_material VARCHAR2(10) CONSTRAINT fk1_material REFERENCES Materials(id_material),
id_art_piece NUMBER(6) CONSTRAINT fk1_art_piece REFERENCES Art_pieces(id_art_piece),
quantity_used NUMBER(4) NOT NULL,
unit_of_measure VARCHAR2(20),
date_of_usage DATE NOT NULL
);

CREATE TABLE Suppliers(


id_supplier VARCHAR2(10) CONSTRAINT pk_supplier PRIMARY KEY,
supplier_name VARCHAR2(20),
supplier_surname VARCHAR2(20),
brand VARCHAR2(20) UNIQUE,
supplier_email VARCHAR2(40) UNIQUE,
stock VARCHAR2(40)
);

CREATE TABLE Material_orders(


id_material VARCHAR2(10) CONSTRAINT fk2_material REFERENCES Materials(id_material),
id_supplier VARCHAR2(10) CONSTRAINT fk_supplier REFERENCES Suppliers(id_supplier),
quantity NUMBER(3),
total_cost NUMBER(5) NOT NULL,
order_date DATE
);

ALTER TABLE Exhibitions RENAME COLUMN id_exhibitions TO id_exhibition;

INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,


hiring_date, salary, bonus) VALUES(100,'Thomas', 'Shelby', '[email protected]', 'graphic design',
to_date('01-01-2016', 'DD-MM-RRRR'), 4500, 300);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(101,'Grace', 'Anderson', '[email protected]', 'painting',
to_date('17-03-2016','DD-MM-RRRR'), 4500, 100);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(102, 'Cristopher', 'Williams', '[email protected]', 'sculpting',
to_date('23-08-2017','DD-MM-RRRR'), 3000, null);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(103, 'Amanda', 'Simmons', '[email protected]', 'color theory',
to_date('06-02-2019', 'DD-MM-RRRR'), 2800, null);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(104, 'Cynthia', 'Rothrock', '[email protected]', 'art history',
to_date('30-07-2018','DD-MM-RRRR'), 3300, null);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(105, 'Aleksander', 'Oretsev', '[email protected]', 'form and
content', to_date('12-09-2017','DD-MM-RRRR'), 3800, 200);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(106, 'Samantha', 'Johanson', '[email protected]',
'contemporary art', to_date('13-09-2020', 'DD-MM-RRRR'), 4000, null);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(107, 'James', 'Bukovski', '[email protected]', 'ceramics',
to_date('21-08-2016','DD-MM-RRRR'), 4700, null);
INSERT INTO Staff (id_staff_member, staff_member_name, staff_member_surname, email, specialisation,
hiring_date, salary, bonus) VALUES(108, 'Vittorio', 'Toscano', '[email protected]', 'life study',
to_date('15-02-2018','DD-MM-RRRR'), 3900, null);

INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(200,


‘Meg’, ‘Thomas’, ’[email protected]’, null, to_date(’01-09-2020’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(201,
‘Dwight’, ‘Fairfield’, ‘[email protected]’, 200, to_date(’03-09-2020’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(202,
‘Yui’, ‘Kimura’, ‘[email protected]’, 300, to_date(’17-09-2020’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(203,
‘Daria’, ‘Astilean’, ‘[email protected]’, 200 , to_date(’12-09-2020’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(204,
‘Jake’, ‘Park’, ‘[email protected]’, null , to_date(’05-03-2016’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(205,
‘Claudette’, ‘Morel’, ‘[email protected]’, null, to_date(’01-03-2016’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(206,
‘Nea’, ‘Karlsson’, ‘[email protected]’, 300 , to_date(’02-03-2016’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(207,
‘Laurie’, ‘Strode’, ‘[email protected]’, null, to_date(’07-03-2016’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(208,
‘William’, ‘Overbeck’, ‘[email protected]’, null, to_date(’23-09-2017’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(209,
‘Feng’, ’Min’, ‘[email protected]’, null, to_date(’14-09-2017’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(210,
’Quentin’, ‘Smith’, ‘[email protected]’, null, to_date(’11-09-2017’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(211,
‘Kate’, ‘Denson’, ’[email protected]’, null, to_date(’08-09-2017’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(212,
‘Cheryl’, ‘Manson’, ‘[email protected]’, null, to_date(’13-03-2018’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(213,
‘Felix’, ‘Richter’, ‘[email protected]’, null, to_date(’02-03-2018’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(214,
‘Jill’, ‘Valentine’, ‘[email protected]’, null, to_date(’07-03-2018’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(215,
‘Mikaela’, ‘Reid’, ‘[email protected]’, null, to_date(’16-03-2018’, ‘DD-MM-RRRR’))

INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(216,


‘Leon’, ‘Kennedy’, ‘[email protected]’, null, to_date(‘09-09-2019’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(217,
‘Yoichi’, ‘Asakawa’, ‘[email protected]’, null, to_date(‘27-09-2019’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(218,
‘Johan’, ‘Vasquez’, ‘[email protected]’, null, to_date(‘25-09-2019’, ‘DD-MM-RRRR’))
INSERT INTO Students(id_stud, stud_name, stud_surname, email, scholarship, enrolment_date) VALUES(219,
‘Haddie’, ‘Kaur’, ‘[email protected]’, null, to_date(‘19-09-2019‘, ‘DD-MM-RRRR’))

INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)


VALUES(‘graphic design’, 72, 2, 200, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design’, 72, 2, 201, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design’, 72, 2, 202, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design’, 72, 2, 203, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design’, 72, 2, 204, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design’, 72, 2, 207, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design’, 72, 2, 215, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘graphic design, 72, 2, 219, 100)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 201, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 205, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 206, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 208, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 209, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 210, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 212, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 213, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 214, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 217, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘painting’, 96, 2, 218, 101)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 207, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 208, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 210, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 212, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 217, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 218, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘sculpting’, 96, 4, 219, 102)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 201, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 205, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 206, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 208, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 209, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 210, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 212, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 213, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 214, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 217, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘color theory’, 48, 2, 218, 103)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 200, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 201, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 202, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 203, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 204, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 205, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 206, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 207, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 208, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 209, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 210, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 212, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 214, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 215, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 216, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 217, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 218, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘art history’, 64, 2, 219, 104)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 200, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 202, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 204, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 206, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 208, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 210, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 211, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 212, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 213, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 214, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 216, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘form and composition’, 48, 2, 218, 105)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘contemporary art’, 48, 4, 201, 106)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘contemporary art’, 48, 4, 203, 106)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘contemporary art’, 48, 4, 206, 106)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘contemporary art’, 48, 4, 208, 106)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘contemporary art’, 48, 4, 218, 106)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘contemporary art’, 48, 4, 219, 106)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 200, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 201, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 202, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 203, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 204, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 205, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 206, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 207, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 208, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 209, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 210, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 212, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 214, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 215, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 216, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 217, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 218, 108)
INSERT INTO Classes(class_name, min_required_hours, hours_per_week, id_stud, id_staff_member)
VALUES(‘life study’, 64, 4, 219, 108)

INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100001, 200,


to_date(’20-10-2020’, ‘DD-MM-RRRR’), ‘coal drawing’, ‘romanticism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100002, 200,
to_date(’13-10-2020’, ‘DD-MM-RRRR’), ‘ceramic vase’, ‘classicism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100003, 201,
to_date(’17-10-2020’, ‘DD-MM-RRRR’), ‘oil painting’, ‘romanticism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100004, 201,
to_date(’20-10-2020’, ‘DD-MM-RRRR’), ‘coal drawing’, ‘expressionism’)

INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100005, 202,


to_date(’20-10-2020’, ‘DD-MM-RRRR’), ‘graphite drawing’, ‘impressionism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100006, 203,
to_date(’20-09-2020’, ‘DD-MM-RRRR’), ‘coal drawing’, ‘modernism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100007, 204,
to_date(’20-09-2020’, ‘DD-MM-RRRR’), ‘coal portrait’, ‘romanticism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100008, 204,
to_date(’20-09-2020’, ‘DD-MM-RRRR’), ‘granite sculpture’, ‘neo-classicism’)

INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100009, 205,


to_date(’12-06-2016’, ‘DD-MM-RRRR’), ‘landscape painting’, ‘cubism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100010, 206,
to_date(’20-06-2016’, ‘DD-MM-RRRR’), ‘portrait painting’, ‘abstract’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100011, 207,
to_date(’05-07-2016’, ‘DD-MM-RRRR’), ‘granite sculpture’, ‘baroque’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100012, 208,
to_date(’10-11-2017’, ‘DD-MM-RRRR’), ‘acrylic painting’, ‘romanticism’)

INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100013, 209,


to_date(’13-11-2017’, ‘DD-MM-RRRR’), ‘ceramic sculpture’, ‘abstract’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100014, 210,
to_date(’03-10-2017’, ‘DD-MM-RRRR’), ‘painting’, ‘abstract’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100015, 211,
to_date(’18-11-2017’, ‘DD-MM-RRRR’), ‘wooden sculpture’, ‘neo-classicism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100016, 212,
to_date(’22-06-2018’, ‘DD-MM-RRRR’), ‘granite human sculpture, ‘renaissance’)

INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100017, 213,


to_date(’19-07-2018’, ‘DD-MM-RRRR’), ‘clay sculpture’, ‘impressionism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100018, 214,
to_date(’03-07-2018’, ‘DD-MM-RRRR’), ‘oil painting’, ‘naturalism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100019, 215,
to_date(’28-06-2018’, ‘DD-MM-RRRR’), ‘graphite drawing’, ‘realism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100020, 217,
to_date(’27-11-2019’, ‘DD-MM-RRRR’), ‘wooden sculpture’, ‘romanticism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100021, 218,
to_date(’14-10-2019’, ‘DD-MM-RRRR’), ‘clay sculpture, ‘hypermodernism’)
INSERT INTO Art_pieces(id_art_piece, id_stud, finish_date, art_form, artistic_current) VALUES(100022, 219,
to_date(’05-10-2019’, ‘DD-MM-RRRR’), ‘coal drawing’, ‘futurism’)

INSERT INTO Exhibitions(id_exhibition, exhibition_name, frequency, location, event_date) VALUES(a01, ‘Frieze


Sculpture’, ‘yearly’, ‘New York’, ‘mid April’)
INSERT INTO Exhibitions(id_exhibition, exhibition_name, frequency, location, event_date) VALUES(a02,
‘Metropolitan Museum of Art, ‘yearly’, ‘New York’, ‘mid October’)
INSERT INTO Exhibitions(id_exhibition, exhibition_name, frequency, location, event_date) VALUES(a03,
‘National Art Gallery’, ‘yearly’, ‘Bucharest’, ‘beginning of May’)
INSERT INTO Exhibitions(id_exhibition, exhibition_name, frequency, location, event_date) VALUES(a04, ‘Soul
Windows, ‘yearly’, ‘Budapest’, ‘late June’)
INSERT INTO Exhibitions(id_exhibition, exhibition_name, frequency, location, event_date) VALUES(a05,
‘Between Worlds’, ‘yearly’, ‘New York’, ‘mid April’)

INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100008, a01,


to_date(’18-04-2023’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100011, a01,
to_date(’18-04-2023’, ‘DD-MM-RRRR’), ‘sold’, 20000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100016, a01,
to_date(’18-04-2023’, ‘DD-MM-RRRR’), ’sold’, 43000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100020, a01,
to_date(’18-04-2023’, ‘DD-MM-RRRR’), ’not sold’, null)

INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100021, a01,


to_date(’18-04-2023’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100001, a02,
to_date(’15-10-2022’, ‘DD-MM-RRRR’), ’sold’, 13000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100003, a02,
to_date(’15-10-2022’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100013, a02,
to_date(’15-10-2022’, ‘DD-MM-RRRR’), ’not sold’, null)

INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100018, a02,


to_date(’15-10-2022’, ‘DD-MM-RRRR’), ’sold’, 117000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100002, a03,
to_date(’03-05-2022’, ‘DD-MM-RRRR’), ’sold’, 250000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100004, a03,
to_date(’03-05-2022’, ‘DD-MM-RRRR’), ’sold’, 437000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100019, a03,
to_date(’03-05-2022’, ‘DD-MM-RRRR’), ’not sold’, null)

INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100005, a04,


to_date(’20-06-2022’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100006, a04,
to_date(’20-06-2022’, ‘DD-MM-RRRR’), ’sold’, 19000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100007, a04,
to_date(’20-06-2022’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100009, a01,
to_date(’20-06-2022’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100010, a04,
to_date(’20-06-2022’, ‘DD-MM-RRRR’), ’sold’, 50000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100012, a05,
to_date(’14-04-2023’, ‘DD-MM-RRRR’), ’not sold’, null)

INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100014, a05,


to_date(’14-04-2023’, ‘DD-MM-RRRR’), ’sold’, 100000)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100015, a05,
to_date(’14-04-2023’, ‘DD-MM-RRRR’), ’not sold’, null)
INSERT INTO Exhibit_lists(id_art_piece, id_exhibition, event_date, status, price_sold) VALUES(100017, a05,
to_date(’14-04-2023’, ‘DD-MM-RRRR’), ’sold’, 95000)

INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m01, ‘paintbrush’,
‘Rembrandt’, 573, 2)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m02, ‘clay’,
‘Rembrandt’, 200, 6)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m03, ‘acrylic paint’,
‘Artist Acryl’, 700, 10)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m04, ‘oil paint’,
‘Phoenix’, 841, 20)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m05, ‘graphite
pens’, ‘Derwent’, 400, 8)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m06, ‘coal,
‘Rembrandt’, 260, 8)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m07, ‘wood block’,
‘Creotime’, 150, 4)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m08, ‘sculpting
tools’, ‘Rembrandt’, 120, 30)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m09, ‘canvas’,
‘Rembrandt’, 300, 18)
INSERT INTO Materials(id_material, article_name, brand, in_stock, price_per_unit) VALUES (m10, ‘paper
booklets’, ‘Clairefontaine’, 200, 10)

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m06’, 100001, 1, piece, to_date(’19-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m10’, 100001, 1, piece, to_date(’19-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m06’, 100001, 1, piece, to_date(’20-10-2020’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m01’, 100003, 6, piece, to_date(’10-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m04’, 100003, 11, tubes, to_date(’10-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m09’, 100003, 1, piece, to_date(’10-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m04’, 100003, 2, tubes, to_date(’20-10-2020’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m05’, 100005, 7, pens, to_date(’07-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m10’, 100005, 1, piece, to_date(’07-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m05’, 100005, 1, pens, to_date(’20-10-2020’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m01’, 100012, 5, piece, to_date(’28-10-2017’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m10’, 100012, 1, piece, to_date(’28-10-2017’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m03’, 100012, 9, piece, to_date(’28-10-2017’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m02’, 100017, 1, pack, to_date(’16-07-2018’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m08’, 100017, 5, piece, to_date(’16-07-2018’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m07’, 100020, 1, block, to_date(’22-11-2019’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m08’, 100020, 3, piece, to_date(’22-11-2019’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m06’, 100004, 2, piece, to_date(’17-10-2020’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m10’, 100004, 3, piece, to_date(’17-10-2020’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m01’, 100009, 9, piece, to_date(’01-06-2016’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m03’, 100009, 5, tubes, to_date(’01-06-2016’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m04’, 100009, 7, tubes, to_date(’01-06-2016’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m09’, 100009, 2, piece, to_date(’01-06-2016’, ‘DD-MM-RRRR’))

INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)


VALUES(‘m07’, 100015, 3, block, to_date(’13-11-2017’, ‘DD-MM-RRRR’))
INSERT INTO Material_register( id_material, id_art_piece, quantity_used, unit_of_measure, date_of_usage)
VALUES(‘m08’, 100015, 4, piece, to_date(’13-11-2017’, ‘DD-MM-RRRR’))

INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)


VALUES(‘s01’, ’Herman’, ‘Carter’, ‘Rembrandt’, ‘[email protected]’, ‘paintbrushes’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s02’, ‘Philip’, ‘Ojomo’, ‘Rembrandt’, ‘[email protected]’, ‘paintbrushes’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s01’, ’Herman’, ‘Carter’, ‘Clayton’, ‘[email protected]’, ‘clay’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s03’, ’Max’, ‘Thompson’, ‘Artist Acryl’, ‘[email protected]’, ‘acrylic paint’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s04’, ’Sally’, ‘Smithson’, ‘Phoenix’, ‘[email protected]’, ‘oil paint’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s05’, ’Miguel’, ‘Myers’, ‘Derwent’, ‘[email protected]’, ‘graphite pens’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s06’, ’Lisa’, ‘Sherwood’, ‘Faber Castle’, ‘[email protected]’, ‘coal’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s07’, ’Jeffrey’, ‘Hawk’, ‘Creotime, ‘[email protected]’, ‘wood blocks’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s08’, ’Rin’, ‘Yamaoka’, ‘ArchiTecht’, ‘[email protected]’, ‘sculpting tools’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s09’, ’Talbolt’, ‘Grimes’, ‘CanvasPro’, ‘[email protected]’, ‘canvas’ )
INSERT INTO Suppliers(id_supplier, supplier_name, supplier_surname, brand, supplier_email, stock)
VALUES(‘s10’, ’Caleb’, ‘Quinn’, ‘Clairefontaine’, ‘[email protected]’, ‘paper booklets’ )

INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m01’, ‘s01’, 50,
100, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m02’, ‘s02’,
200, 1200, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m03’, ‘s03’, 60,
600, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m04’, ‘s04’, 30,
600, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m05’, ‘s05’, 70,
560, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m06’, ‘s06’,
100, 800, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m07’, ‘s07’, 20,
80, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m08’, ‘s08’, 27,
810, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m09’, ‘s09’, 30,
540, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m10’, ‘s10’, 20,
200, to_date(’10-10-2019’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m01’, ‘s01’, 80,
160, to_date(’05-03-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m02’, ‘s02’, 40,
240, to_date(’05-03-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m05’, ‘s05’,
150, 1200, to_date(’05-03-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m06’, ‘s06’, 35,
280, to_date(’05-03-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m08’, ‘s08’, 15,
450, to_date(’05-03-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m02’, ‘s02’, 78,
468, to_date(’17-06-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m03’, ‘s03’, 80,
800, to_date(’17-06-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m04’, ‘s04’, 50,
1000, to_date(’17-06-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m06’, ‘s06’, 20,
160, to_date(’17-06-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m07’, ‘s07’, 70,
240, to_date(’23-09-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m01’, ‘s01’, 60,
120, to_date(’23-09-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m07’, ‘s07’, 70,
240, to_date(’23-09-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m09’, ‘s09’, 45,
810, to_date(’23-09-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m10’, ‘s10’, 80,
800, to_date(’23-09-2020’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m02’, ‘s02’,
100, 600, to_date(’14-02-2021’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m03’, ‘s03’,
120, 1200, to_date(’14-02-2021’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m01’, ‘s01’, 85,
170, to_date(’28-05-2021’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m04’, ‘s04’, 80,
1600, to_date(’28-05-2021’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m02’, ‘s02’, 25,
300, to_date(’13-11-2021’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m05’, ‘s05’, 60,
480, to_date(’13-11-2021’,’DD-MM-RRRR’))
INSERT INTO Material_orders(id_material, id_supplier, quantity, total_cost, order_date) VALUES(‘m06’, ‘s06’, 30,
240, to_date(’13-11-2021’,’DD-MM-RRRR’))

You might also like