0% found this document useful (0 votes)
6 views19 pages

CREATE DATABASE TUKOD

The document outlines the creation of a database named TUKOD_Firm, including various tables such as Tukod_firm, BoardOfDirectors, and others related to finance, accounting, equipment management, and project costing. It includes SQL commands for creating tables, inserting data, and establishing foreign key relationships. The document provides a detailed structure for managing personnel and equipment within the firm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views19 pages

CREATE DATABASE TUKOD

The document outlines the creation of a database named TUKOD_Firm, including various tables such as Tukod_firm, BoardOfDirectors, and others related to finance, accounting, equipment management, and project costing. It includes SQL commands for creating tables, inserting data, and establishing foreign key relationships. The document provides a detailed structure for managing personnel and equipment within the firm.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

CREATE DATABASE TUKOD_Firm

CREATE TABLE Tukod_firm (

CEO_ID INT AUTO_INCREMENT PRIMARY KEY,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

);

INSERT INTO Tukod_firm (

Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress, Address,


DateEmployed

VALUES

('Owner', 'Junah', ‘Yu’, 'Milca', 22, '+63-912-345-6789', ‘[email protected]', ‘Balud Sta.


Margarita, Samar, PH', '2015-06-01'),

('Owner', 'Prime Jade', ‘Dulatre’, 'Bagallon', 50, '+63-915-678-4321', '[email protected]',


‘Brgy. Tinambacan, Calbayog, PH', '2016-08-15'),

CREATE TABLE BoardOfDirectors (

CEO_ID INT,

BOD_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),
MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (CEO_ID) references Tukod_firm (CEO_ID)

);

INSERT INTO BoardOfDirectors (

CEO_ID, BOD_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

VALUES

(12, 12-1, 'Finance Director', 'Maria', 'Santos', 'Lopez', 35, '+63-915-678-4321',


'[email protected]', '456 Ortigas Center, Pasig, PH', '2016-08-15'),

(12, 12-2, 'Operations Director', 'Carlos', 'Reyes', 'Gonzales', 45, '+63-917-456-7890',


'[email protected]', '789 BGC, Taguig, PH', '2018-01-20'),

(12, 12-3, 'Technology & Information Director', 'Rafael', 'Torres', 'Santiago', 37, '+63-910-234-5678',
'[email protected]', '234 Mandaluyong, PH', '2019-03-10'),

(12, 12-4, 'Legal Director', 'Ana', 'Martinez', 'Velasco', 28, '+63-916-345-9876',


'[email protected]', '567 QC, PH', '2020-07-05'),

(12, 12-5, 'Sales & Marketing Director', 'Miguel', 'Fernandez', 'Ramos', 38, '+63-918-567-4321',
'[email protected]', '890 Manila, PH', '2021-09-15'),

(12, 12-6, 'Admin & HR Director', 'Lucia', 'Domingo', 'Castillo', 40, '+63-919-876-5432',
'[email protected]', '345 Makati, PH', '2022-01-30');
CREATE TABLE FINANCE_Department (

BOD_ID INT,

FD_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (BOD_ID) references BoardOfDirectors (BOD_ID)

);

INSERT INTO FINANCE_Department (

BOD_ID, FD_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

VALUES

(‘’, ‘’, 'Finance_Manager', 'Elena', 'Reyes', 'Fernandez', 40, '+63-921-456-7890',


'[email protected]', '123 Makati Ave, Makati, PH', '2018-06-15'),

CREATE TABLE Accounting (

FD_ID INT,

ACC_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),
LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (FD_ID) references BoardOfDirectors (FD_ID)

);

INSERT INTO Accounting (

FD_ID, ACC_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

(‘’,’’, 'Accounting_Manager', 'Daniel', 'Cruz', 'Santos', 35, '+63-922-345-6789',


'[email protected]', '456 BGC, Taguig, PH', '2019-09-10'),

CREATE TABLE EquipmentManagement (

ACC_ID INT,

EM_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (ACC_ID) references Accounting (ACC_ID)


);

INSERT INTO EquipmentManagement (

ACC_ID, EM_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

(‘’,’’, 'Asset_Manager', 'Doniel', 'Dimango', 'Sinoos', 34, '+63-923-345-6789', '[email protected]',


'456 BGC, Taguig, PH', '2019-09-10'),

CREATE TABLE construction_equipment (

EM_ID INT,

equipment_id INT AUTO_INCREMENT PRIMARY KEY,

equipment_name VARCHAR(255) NOT NULL,

equipment_type VARCHAR(100),

brand VARCHAR(100),

purchase_date DATE,

condition VARCHAR(50),

price DECIMAL(10, 2),

status VARCHAR(50)

Foreign Key (EM_ID) references EquipmentManagement (EM_ID)

);

INSERT INTO construction_equipment (EM_ID, equipment_id, equipment_name, equipment_type,


brand, purchase_date, condition, price, status)

VALUES

(‘’,’1’,'Backhoe Loader', 'Heavy machinery', 'John Deere', '2021-03-12', 'Used', 35000.00, 'In-use'),

(‘’,’2’,'Road Roller', 'Heavy machinery', 'Volvo', '2018-06-25', 'Used', 25000.00, 'Available'),

(‘’,’3’,'Scissor Lift', 'Material handling', 'Genie', '2022-07-30', 'New', 15000.00, 'In-use'),

(‘',’4’,’Dump Truck', 'Heavy machinery', 'Mack', '2020-11-05', 'Used', 45000.00, 'Under maintenance'),

(‘’,’5’,'Tower Crane', 'Heavy machinery', 'Terex', '2019-04-17', 'Used', 150000.00, 'Available'),


(‘’,’6’,'Welding Machine', 'Construction tools', 'Lincoln Electric', '2023-01-25', 'New', 2200.00, 'Available'),

(‘’,’7’,'Generator', 'Construction tools', 'Honda', '2021-09-19', 'New', 5000.00, 'In-use'),

(‘’,’8’,'Paver', 'Heavy machinery', 'Caterpillar', '2022-08-05', 'Used', 90000.00, 'In-use'),

(‘’,’9’,'Tamping Rammer', 'Construction tools', 'Wacker Neuson', '2020-04-12', 'Used', 3500.00, 'Under
maintenance'),

(‘’,’10’,'Concrete Pump', 'Heavy machinery', 'Schwing', '2021-11-20', 'New', 70000.00, 'Available');

CREATE TABLE maintenance_schedule (

EM_ID INT,

maintenance_id INT AUTO_INCREMENT PRIMARY KEY,

equipment_id INT,

maintenance_date DATE,

maintenance_type VARCHAR(100),

description TEXT,

cost DECIMAL(10, 2),

next_scheduled_maintenance DATE,

status VARCHAR(50),

FOREIGN KEY (equipment_id) REFERENCES construction_equipment(equipment_id)

);

INSERT INTO maintenance_schedule (EM_ID, equipment_id, maintenance_date, maintenance_type,


description, cost, next_scheduled_maintenance, status)

VALUES

(‘’, 1, 0'2023-12-10', 'Preventive', 'Oil change, hydraulic system check, filter replacement', 500.00, '2024-
12-10', 'Completed'),

(‘’,2, '2023-08-15', 'Corrective', 'Engine repair, transmission issue fix', 1500.00, '2024-08-15',
'Completed'),

(‘’,3, '2024-02-01', 'Preventive', 'Lubrication, electrical system check', 300.00, '2025-02-01', 'Completed'),

(‘’,4, '2023-10-30', 'Corrective', 'Brakes repair, safety checks', 2000.00, '2024-10-30', 'Completed'),
(‘’,5, '2024-01-05', 'Preventive', 'Full system inspection, crane arm check', 1200.00, '2025-01-05',
'Completed'),

(‘’,6, '2023-11-10', 'Preventive', 'Battery check, inspection of lifting mechanisms', 400.00, '2024-11-10',
'Completed'),

(‘’,7, '2024-03-10', 'Corrective', 'Engine replacement, wiring fixes', 5000.00, '2025-03-10', 'Pending'),

(‘’,8, '2023-09-05', 'Preventive', 'Track and hydraulic oil checks, filter replacement', 800.00, '2024-09-05',
'Completed'),

(‘’,9, '2023-07-20', 'Preventive', 'Tire check, system inspection', 300.00, '2024-07-20', 'Pending'),

(‘’,10, '2024-01-15', 'Corrective', 'Pump valve replacement, motor check', 2200.00, '2025-01-15',
'Pending');

CREATE TABLE ProjectAccounting (

ACC_ID INT,

PA_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (ACC_ID) references Accounting (ACC_ID)

);

INSERT INTO ProjectAccounting (

ACC_ID, PA_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed
)

(‘’,’’, 'Estimator', 'Doniel', 'Dimango', 'Sinoos', 34, '+63-923-345-6789', '[email protected]', '456


BGC, Taguig, PH', '2019-09-10'),

CREATE TABLE COSTING (

PA_ID INT,

project_id INT,

project_name VARCHAR(255) NOT NULL,

client_name VARCHAR(255),

cost_type VARCHAR(50), -- Material, Labor, Equipment, etc.

cost_description TEXT,

cost_amount DECIMAL(15, 2),

cost_date DATE,

labor_hours DECIMAL(10, 2) DEFAULT 0, -- Relevant only for labor costs

labor_rate DECIMAL(10, 2) DEFAULT 0, -- Relevant only for labor costs

material_quantity DECIMAL(10, 2) DEFAULT 0, -- Relevant only for materials

material_unit_price DECIMAL(15, 2) DEFAULT 0, -- Relevant only for materials

PRIMARY KEY (project_id, cost_type, cost_description, cost_date)

FOREIGN KEY (PA_ID) REFERENCES ProjectAccounting (PA_ID)

);

INSERT INTO COSTING

(PA_ID, project_id, project_name, client_name, cost_type, cost_description, cost_amount, cost_date,


labor_hours, labor_rate, material_quantity, material_unit_price)

VALUES

(‘’, 1, 'Downtown Office Tower', 'XYZ Enterprises', 'Material', 'Glass Facade Panels', 15000, '2025-03-
20', 72, 3000, 500, 50),

(‘’, 2, 'Downtown Office Tower', 'XYZ Enterprises', 'Labor', 'Masonry Work', 100000, '2025-03-22', 200,
30.00, 0, 0),

(‘’, 3, 'City Mall Expansion', 'RetailCorp', 'Equipment', 'Forklift Rental', 1200.00, '2025-03-23', 0, 0, 0, 0),
(‘’, 4, 'City Mall Expansion', 'RetailCorp', 'Overhead', 'Project Management Fees', 5000.00, '2025-03-
24', 0, 0, 0, 0),

(‘’, 5, 'Suburban Housing Development', 'HomeBuild Ltd.', 'Contingency', 'Additional Landscaping


Costs', 1500.00, '2025-03-25', 0, 0, 0, 0);

CREATE TABLE Operations_Department (

BOD_ID INT,

OD_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (BOD_ID) references BoardOfDirectors (BOD_ID)

);

INSERT INTO Operations_Directors (

BOD_ID, OD_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

VALUES

(‘’, ‘’, 'Operation Manager', 'Elana', 'Ramuelez', 'Fezo', 39, '+63-921-456-6890', '[email protected]',
'123 Makati Ave, Makati, PH', '2019-06-15'),

CREATE TABLE Pre_Construction (

OD_ID INT,
PC_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (OD_ID) references Operations_Department (OD_ID)

Foreign Key (PA_ID) references ProjectAccounting (PA_ID)

);

CREATE TABLE Construction (

OD_ID INT,

C_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (OD_ID) references Operations_Department (OD_ID)

);
INSERT INTO Construction (

OD_ID, C_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

VALUES

(‘’,’’, 'Chief Operating Officer', 'Alice', 'L', 'Williams', 50, '555-9876', '[email protected]', '101
Business Blvd, New York, NY', '2010-05-15'),

CREATE TABLE ENGINEERS (

C_ID INT,

ENGR_ID INT,

Project_ID,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (C_ID) references Construction (C_ID)

);

INSERT INTO ENGINEERS (C_ID, ENGR_ID, Project_ID, Position, FirstName, MiddleName, LastName, Age,
PhoneNumber, EmailAddress, Address, DateEmployed)

VALUES

(‘’, ‘’, 1, 'Civil Engineer', 'John', 'A', 'Doe', 30, '555-1234', '[email protected]', '123 Elm St, New York,
NY', '2018-05-01'),
(‘’,’’, 2, 'Civil Engineer', 'Emma', 'B', 'Taylor', 27, '555-2345', 'emma.taylor@ gmail.com', '456 Oak Rd,
New York, NY', '2019-02-15'),

(‘’,’’, 3, 'Civil Engineer', 'David', 'C', 'Smith', 33, '555-3456', 'david.smith@ gmail.com', '789 Pine Ave, Los
Angeles, CA', '2017-11-23'),

(‘’,’’, 4, 'Civil Engineer', 'Sophia', 'D', 'Jones', 29, '555-4567', 'sophia.jones@ gmail.com', '101 Maple St,
Chicago, IL', '2018-07-12'),

(‘’,’’, 5, 'Civil Engineer', 'Michael', 'E', 'Brown', 35, '555-5678', 'michael.brown@ gmail.com', '112 Birch
Rd, Dallas, TX', '2016-04-10');

CREATE TABLE FOREMAN (

C_ID INT,

FM_ID INT,

Project_ID,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (C_ID) references Construction (C_ID)

);

INSERT INTO FOREMAN (C_ID, FM_ID, Project_ID, Position, FirstName, MiddleName, LastName, Age,
PhoneNumber, EmailAddress, Address, DateEmployed)

VALUES

(‘’,’’,1, 'Foreman', 'James', 'A', 'Wilson', 40, '555-1234', '[email protected]', '123 Elm St, New
York, NY', '2015-05-01'),
(‘’,’’,2, 'Foreman', 'Oliver', 'B', 'Martinez', 38, '555-2345', '[email protected]', '456 Oak Rd,
New York, NY', '2016-03-15'),

(‘’,’’,3, 'Foreman', 'Liam', 'C', 'Garcia', 42, '555-3456', '[email protected]', '789 Pine Ave, Los
Angeles, CA', '2014-11-23'),

(‘’,’’,4, 'Foreman', 'Benjamin', 'D', 'Rodriguez', 45, '555-4567', '[email protected]', '101


Maple St, Chicago, IL', '2013-07-12'),

(‘’,’’,5, 'Foreman', 'Lucas', 'E', 'Hernandez', 37, '555-5678', '[email protected]', '112 Birch
Rd, Dallas, TX', '2017-02-10');

CREATE TABLE WORKERS (

C_ID INT,

WORKER_ID,

Project_ID,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (C_ID) references Construction (C_ID)

);

INSERT INTO WORKERS (C_ID, WORKER_ID, Project_ID, Position, FirstName, MiddleName, LastName,
Age, PhoneNumber, EmailAddress, Address, DateEmployed)

VALUES

("", "", 1, "Skilled", "Michael", "Andrew", "Johnson", 35, "9876543210", "[email protected]",


"123 Main St, Cityville", "2023-06-15"),
("", "", 2, "Semi Skilled", "Robert", "William", "Smith", 40, "9876543211", "[email protected]",
"456 Oak St, Townsville", "2023-07-10"),

("", "", 3, "Welder", "James", "Edward", "Brown", 28, "9876543212", "[email protected]", "789
Pine St, Villagetown", "2023-05-22"),

("", "", 4, "Skilled", "John", "Christopher", "Davis", 32, "9876543213", "[email protected]", "159
Maple St, Suburbia", "2023-08-18"),

("", "", 5, "Semi Skilled", "David", "Joseph", "Wilson", 45, "9876543214", "[email protected]",
"753 Elm St, Metrocity", "2023-09-30"),

("", "", 1, "Welder", "Richard", "Daniel", "Martinez", 38, "9876543215", "[email protected]",


"951 Birch St, Newtown", "2023-10-11"),

("", "", 2, "Skilled", "Charles", "Anthony", "Anderson", 29, "9876543216",


"[email protected]", "852 Cedar St, Rivercity", "2023-11-25"),

("", "", 3, "Semi Skilled", "Joseph", "Henry", "Thomas", 37, "9876543217", "[email protected]",
"369 Walnut St, Hilltown", "2023-12-12"),

("", "", 4, "Welder", "Christopher", "Patrick", "Harris", 33, "9876543218", "[email protected]", "951
Spruce St, Lakeside", "2023-06-05"),

("", "", 5, "Skilled", "Matthew", "Steven", "Clark", 42, "9876543219", "[email protected]", "123
Fir St, Baytown", "2023-07-19"),

("", "", 1, "Semi Skilled", "Daniel", "Michael", "Rodriguez", 31, "9876543220",


"[email protected]", "789 Cedar St, Downtown", "2023-08-22"),

("", "", 2, "Welder", "Paul", "Gregory", "Lewis", 36, "9876543221", "[email protected]", "951
Chestnut St, Uptown", "2023-09-14"),

("", "", 3, "Skilled", "Mark", "Timothy", "Walker", 39, "9876543222", "[email protected]", "357
Hickory St, Greenfield", "2023-10-30"),

("", "", 4, "Semi Skilled", "Steven", "Francis", "Hall", 27, "9876543223", "[email protected]", "468
Redwood St, Sunnytown", "2023-11-18"),

("", "", 5, "Welder", "Kevin", "Raymond", "Allen", 34, "9876543224", "[email protected]", "159
Hemlock St, Westville", "2023-12-21"),

("", "", 1, "Skilled", "Brian", "Nicholas", "Young", 30, "9876543225", "[email protected]", "357
Mahogany St, Eastport", "2023-07-02"),

("", "", 2, "Semi Skilled", "Edward", "Samuel", "King", 41, "9876543226", "[email protected]",
"753 Sycamore St, Southend", "2023-08-14"),

("", "", 3, "Welder", "George", "Vincent", "Wright", 26, "9876543227", "[email protected]", "258
Larch St, Northgate", "2023-09-25"),
("", "", 4, "Skilled", "Donald", "Jeffrey", "Lopez", 35, "9876543228", "[email protected]", "357
Teak St, Eastwood", "2023-10-12"),

("", "", 5, "Semi Skilled", "Ronald", "Howard", "Hill", 38, "9876543229", "[email protected]", "468
Sequoia St, Oldtown", "2023-11-03"),

("", "", 1, "Welder", "Kenneth", "Alexander", "Scott", 29, "9876543230", "[email protected]",


"159 Cedar St, Beachside", "2023-12-05"),

("", "", 2, "Skilled", "Timothy", "Douglas", "Green", 33, "9876543231", "[email protected]", "753
Hickory St, Mountainview", "2023-06-07"),

("", "", 3, "Semi Skilled", "Jason", "Walter", "Adams", 40, "9876543232", "[email protected]",
"123 Fir St, Hillside", "2023-07-08"),

("", "", 4, "Welder", "Jeffrey", "Lawrence", "Baker", 36, "9876543233", "[email protected]", "789
Maple St, Valleytown", "2023-08-19"),

("", "", 5, "Skilled", "Ryan", "Eric", "Nelson", 31, "9876543234", "[email protected]", "951 Pine St,
Seaside", "2023-09-22"),

("", "", 1, "Semi Skilled", "Gary", "Russell", "Carter", 45, "9876543235", "[email protected]", "357
Walnut St, Countryside", "2023-10-14"),

("", "", 2, "Welder", "Jacob", "Shawn", "Mitchell", 27, "9876543236", "[email protected]", "258
Redwood St, Lakeview", "2023-11-28"),

("", "", 3, "Skilled", "Eric", "Dennis", "Perez", 32, "9876543237", "[email protected]", "468 Birch St,
Midtown", "2023-12-09"),

("", "", 4, "Semi Skilled", "Stephen", "Bryan", "Roberts", 39, "9876543238",


"[email protected]", "951 Chestnut St, Harborcity", "2023-06-23");

CREATE TABLE IT_DEPARTMENT (

BOD_ID INT,

IT_ID INT,

Assignment VARCHAR(50),

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,
PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (BOD_ID) references BoardOfDirectors (BOD_ID)

);

INSERT INTO IT_DEPARTMENT (

BOD_ID, IT_ID, Position, Assignment, FirstName, MiddleName, LastName, Age, PhoneNumber,


EmailAddress, Address, DateEmployed

VALUES

(‘’,’’, 'IT Worker', 'Mobile Pages', 'John', 'Arnaez', 'Doe', 30, '123-456-7890', '[email protected]', '123
Main St, City, Country', '2020-01-15'),

(‘’,’’,, 'IT Worker', 'Company Management Software', 'Jane', 'Bolatre', 'Smith', 28, '987-654-3210',
'[email protected]', '456 Elm St, City, Country', '2021-03-22');

CREATE TABLE LEGAL_DEPARTMENT (

BOD_ID INT,

LD_ID INT,

Assignment VARCHAR(50),

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,
Foreign Key (BOD_ID) references LEGAL_DEPARTMENT (BOD_ID)

);

INSERT INTO LEGAL_DEPARTMENT (

BOD_ID, LD_ID, Position, Assignment, FirstName, MiddleName, LastName, Age, PhoneNumber,


EmailAddress, Address, DateEmployed

VALUES

(‘’,’’,'Legal Counsel', 'Contract Review', 'Alice', 'Malaha', 'Johnson', 35, '555-123-4567',


'[email protected]', '789 Oak St, City, Country', '2018-06-01'),

(‘’,’’,'Legal Assistant', 'Compliance Documentation', 'Bob', 'Lobneton', 'Brown', 28, '555-987-6543',


'[email protected]', '321 Pine St, City, Country', '2020-11-15');

CREATE TABLE SALES_AND_MARKETING_DEPARTMENT (

BOD_ID INT,

SMD_ID INT,

Assignment VARCHAR(50),

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (BOD_ID) references LEGAL_DEPARTMENT (BOD_ID)

);
INSERT INTO SALES_AND_MARKETING_DEPARTMENT (

BOD_ID, SMD_ID, Position, Assignment, FirstName, MiddleName, LastName, Age, PhoneNumber,


EmailAddress, Address, DateEmployed

VALUES

(‘’,’’, 'Sales Manager', 'New Client Acquisition', 'Michael', 'T.', 'Davis', 40, '555-111-2233',
'[email protected]', '100 Business Ave, City, Country', '2015-03-10'),

(‘’,’’, 'Marketing Specialist', 'Advertising Campaigns', 'Sarah', 'P.', 'Miller', 32, '555-222-3344',
'[email protected]', '200 Corporate Rd, City, Country', '2018-07-22');

CREATE TABLE HUMAN_RESOURCE_DEPARTMENT (

BOD_ID INT,

HR_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (BOD_ID) references LEGAL_DEPARTMENT (BOD_ID)

);

INSERT INTO HUMAN_RESOURCE_DEPARTMENT (

BOD_ID, HR_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

)
(‘’,’’, 'HR Manager', 'Mitel', 'Tan', 'David', 40, '555-111-2233', '[email protected]', '100
Business Ave, City, Country', '2015-03-10'),

CREATE TABLE PAYROLL_AND_STAFFING (

HR_ID INT,

PS_ID INT,

Position VARCHAR(50),

FirstName VARCHAR(50),

MiddleName VARCHAR(50),

LastName VARCHAR(50),

Age INT,

PhoneNumber VARCHAR(13),

EmailAddress VARCHAR(50),

Address TEXT,

DateEmployed DATE,

Foreign Key (HR_ID) references HUMAN_RESOURCE_DEPARTMENT (HR_ID)

);

INSERT INTO PAYROLL_AND_STAFFING (

HR_ID, PS_ID, Position, FirstName, MiddleName, LastName, Age, PhoneNumber, EmailAddress,


Address, DateEmployed

You might also like