Activity 7: Creating a Database and Tables in MySQL with Dummy Data
Step 1: Open MySQL Command Line
Open your terminal or command prompt.
Log in to MySQL with your credentials:
mysql -u your_username -p
Step 2: Create Database
Create a new database named
denormalized_db
:CREATE DATABASE denormalized_db;
Use the newly created database:
USE denormalized_db;
Step 3: Create Tables
3.1 Create employeetbl
CREATE TABLE employeetbl (
employeeID INT PRIMARY KEY,
employeeName VARCHAR(100),
departmentID VARCHAR(10),
departmentName VARCHAR(100),
managerID VARCHAR(10),
managerName VARCHAR(100),
projectID VARCHAR(10),
projectName VARCHAR(100),
salary DECIMAL(10, 2),
address VARCHAR(255),
city VARCHAR(100),
state VARCHAR(50),
zipCode VARCHAR(10),
phone VARCHAR(15),
email VARCHAR(100),
hireDate DATE,
jobTitle VARCHAR(100),
managerPhone VARCHAR(15),
managerEmail VARCHAR(100),
projectDeadline DATE,
projectStatus VARCHAR(20)
);
3.2 Create studenttbl
CREATE TABLE studenttbl (
studentID INT PRIMARY KEY,
studentName VARCHAR(100),
classID VARCHAR(10),
className VARCHAR(100),
teacherID VARCHAR(10),
teacherName VARCHAR(100),
courseID VARCHAR(10),
courseName VARCHAR(100),
birthDate DATE,
grade VARCHAR(10),
address VARCHAR(255),
city VARCHAR(100),
state VARCHAR(50),
zipCode VARCHAR(10),
phone VARCHAR(15),
email VARCHAR(100),
enrollmentDate DATE,
guardianName VARCHAR(100),
guardianPhone VARCHAR(15),
guardianEmail VARCHAR(100),
attendanceRate VARCHAR(10),
isGraduated VARCHAR(5)
);
3.3 Create producttbl
CREATE TABLE producttbl (
productID VARCHAR(10) PRIMARY KEY,
productName VARCHAR(100),
categoryID VARCHAR(10),
categoryName VARCHAR(100),
supplierID VARCHAR(10),
supplierName VARCHAR(100),
price DECIMAL(10, 2),
stock INT,
supplierPhone VARCHAR(15),
supplierEmail VARCHAR(100),
warehouseID VARCHAR(10),
warehouseLocation VARCHAR(100),
reorderLevel INT,
manufacturerID VARCHAR(10),
manufacturerName VARCHAR(100),
manufacturerPhone VARCHAR(15),
manufacturerEmail VARCHAR(100),
dateAdded DATE,
salesAmount DECIMAL(10, 2),
lastRestocked DATE,
status VARCHAR(20),
SKU VARCHAR(20),
description VARCHAR(255)
);
3.4 Create ordertbl
CREATE TABLE ordertbl (
orderID INT PRIMARY KEY,
customerID VARCHAR(10),
customerName VARCHAR(100),
productID VARCHAR(10),
productName VARCHAR(100),
quantity INT,
orderDate DATE,
shippingDate DATE,
shippingMethod VARCHAR(50),
shippingAddress VARCHAR(255),
city VARCHAR(100),
state VARCHAR(50),
zipCode VARCHAR(10),
phone VARCHAR(15),
email VARCHAR(100),
totalAmount DECIMAL(10, 2),
discount DECIMAL(10, 2),
salesRepID VARCHAR(10),
salesRepName VARCHAR(100),
salesRepPhone VARCHAR(15),
salesRepEmail VARCHAR(100),
paymentMethod VARCHAR(50),
status VARCHAR(20),
trackingNumber VARCHAR(50)
);
3.5 Create salestbl
CREATE TABLE salestbl (
saleID INT PRIMARY KEY,
orderID INT,
saleAmount DECIMAL(10, 2),
saleDate DATE,
customerID VARCHAR(10),
FOREIGN KEY (orderID) REFERENCES ordertbl(orderID)
);
Step 4: Insert Dummy Data
4.1 Insert into employeetbl
INSERT INTO employeetbl (employeeID, employeeName, departmentID, departmentName, managerID, managerName, projectID, projectName, salary, address, city, state, zipCode, phone, email, hireDate, jobTitle, managerPhone, managerEmail, projectDeadline, projectStatus) VALUES
(101, 'John Smith', 'D001', 'IT', 'M001', 'Lisa White', 'P001', 'Alpha', 60000, '123 Elm St', 'New York', 'NY', '10001', '555-1234', 'john@example.com', '2020-01-15', 'Developer', '555-3456', 'lisa.white@example.com', '2022-12-01', 'Active'),
(102, 'Jane Doe', 'D002', 'HR', 'M002', 'Bob Brown', 'P002', 'Beta', 65000, '456 Maple Ave', 'New York', 'NY', '10002', '555-5678', 'jane@example.com', '2019-11-05', 'Designer', '555-8765', 'bob.brown@example.com', '2023-01-15', 'Completed'),
(103, 'Bob Brown', 'D003', 'Sales', 'M003', 'Emma Blue', 'P003', 'Gamma', 55000, '789 Oak Dr', 'New York', 'NY', '10003', '555-8765', 'bob@example.com', '2021-02-12', 'Analyst', '555-9091', 'emma.blue@example.com', '2022-11-20', 'Active'),
(104, 'Lisa White', 'D001', 'IT', 'M001', 'Lisa White', 'P001', 'Alpha', 70000, '234 Pine St', 'New York', 'NY', '10004', '555-3456', 'lisa.white@example.com', '2018-09-08', 'Manager', '555-3456', 'lisa.white@example.com', '2022-12-01', 'Active'),
(105, 'Tom Green', 'D002', 'HR', 'M002', 'Bob Brown', 'P002', 'Beta', 50000, '567 Birch Blvd', 'New York', 'NY', '10005', '555-6543', 'tom.green@example.com', '2017-03-25', 'Developer', '555-8765', 'bob.brown@example.com', '2023-01-15', 'Completed'),
(106, 'Lucy Black', 'D001', 'IT', 'M001', 'Lisa White', 'P004', 'Delta', 62000, '123 Elm St', 'New York', 'NY', '10001', '555-1299', 'lucy.black@example.com', '2020-06-20', 'Developer', '555-3456', 'lisa.white@example.com', '2022-09-05', 'Active'),
(107, 'Mike Grey', 'D002', 'HR', 'M002', 'Bob Brown', 'P002', 'Beta', 54000, '456 Maple Ave', 'New York', 'NY', '10002', '555-7801', 'mike.grey@example.com', '2019-08-13', 'Designer', '555-8765', 'bob.brown@example.com', '2023-01-15', 'Completed'),
(108, 'Emma Blue', 'D003', 'Sales', 'M003', 'Emma Blue', 'P005', 'Epsilon', 58000, '789 Oak Dr', 'New York', 'NY', '10003', '555-9091', 'emma.blue@example.com', '2021-04-05', 'Analyst', '555-9091', 'emma.blue@example.com', '2023-05-01', 'Active'),
(109, 'Liam Red', 'D003', 'Sales', 'M003', 'Emma Blue', 'P003', 'Gamma', 59000, '234 Pine St', 'New York', 'NY', '10004', '555-7890', 'liam.red@example.com', '2018-10-02', 'Manager', '555-9091', 'emma.blue@example.com', '2022-11-20', 'Active'),
(110, 'Noah Yellow', 'D001', 'IT', 'M001', 'Lisa White', 'P004', 'Delta', 61000, '567 Birch Blvd', 'New York', 'NY', '10005', '555-6789', 'noah.yellow@example.com', '2017-07-18', 'Developer', '555-3456', 'lisa.white@example.com', '2022-09-05', 'Active');
4.2 Insert into studenttbl
INSERT INTO studenttbl (studentID, studentName, classID, className, teacherID, teacherName, courseID, courseName, birthDate, grade, address, city, state, zipCode, phone, email, enrollmentDate, guardianName, guardianPhone, guardianEmail, attendanceRate, isGraduated) VALUES
(201, 'Alice Johnson', 'C001', 'Biology', 'T001', 'Mr. Smith', 'COURSE01', 'Biology 101', '2005-03-15', 'A', '111 First St', 'Los Angeles', 'CA', '90001', '555-1111', 'alice.j@example.com', '2021-09-01', 'Maria Johnson', '555-2222', 'maria.johnson@example.com', '95%', 'No'),
(202, 'David Brown', 'C002', 'Chemistry', 'T002', 'Mrs. Davis', 'COURSE02', 'Chemistry 101', '2006-06-22', 'B', '222 Second St', 'Los Angeles', 'CA', '90002', '555-3333', 'david.b@example.com', '2021-09-01', 'John Brown', '555-4444', 'john.brown@example.com', '92%', 'No'),
(203, 'Sophia White', 'C003', 'Physics', 'T003', 'Mr. Wilson', 'COURSE03', 'Physics 101', '2004-10-05', 'A', '333 Third St', 'Los Angeles', 'CA', '90003', '555-5555', 'sophia.w@example.com', '2021-09-01', 'Linda White', '555-6666', 'linda.white@example.com', '90%', 'No'),
(204, 'Michael Green', 'C004', 'Mathematics', 'T004', 'Mr. Miller', 'COURSE04', 'Math 101', '2005-05-18', 'B', '444 Fourth St', 'Los Angeles', 'CA', '90004', '555-7777', 'michael.g@example.com', '2021-09-01', 'Daniel Green', '555-8888', 'daniel.green@example.com', '85%', 'No'),
(205, 'Emma Black', 'C005', 'English', 'T005', 'Mrs. Taylor', 'COURSE05', 'English 101', '2005-01-12', 'A', '555 Fifth St', 'Los Angeles', 'CA', '90005', '555-9999', 'emma.b@example.com', '2021-09-01', 'Jessica Black', '555-0000', 'jessica.black@example.com', '98%', 'No'),
(206, 'Liam Red', 'C006', 'History', 'T006', 'Mr. Thompson', 'COURSE06', 'History 101', '2004-02-25', 'B', '666 Sixth St', 'Los Angeles', 'CA', '90006', '555-1010', 'liam.r@example.com', '2021-09-01', 'Nora Red', '555-2020', 'nora.red@example.com', '88%', 'No'),
(207, 'Ava Blue', 'C007', 'Art', 'T007', 'Ms. Anderson', 'COURSE07', 'Art 101', '2005-11-30', 'A', '777 Seventh St', 'Los Angeles', 'CA', '90007', '555-3030', 'ava.b@example.com', '2021-09-01', 'Ryan Blue', '555-4040', 'ryan.blue@example.com', '97%', 'No'),
(208, 'James Yellow', 'C008', 'Physical Education', 'T008', 'Mr. Clark', 'COURSE08', 'PE 101', '2004-09-14', 'B', '888 Eighth St', 'Los Angeles', 'CA', '90008', '555-5050', 'james.y@example.com', '2021-09-01', 'Olivia Yellow', '555-6060', 'olivia.yellow@example.com', '89%', 'No'),
(209, 'Isabella Orange', 'C009', 'Computer Science', 'T009', 'Mr. Scott', 'COURSE09', 'CS 101', '2005-04-20', 'A', '999 Ninth St', 'Los Angeles', 'CA', '90009', '555-7070', 'isabella.o@example.com', '2021-09-01', 'William Orange', '555-8080', 'william.orange@example.com', '96%', 'No'),
(210, 'Ethan Purple', 'C010', 'Music', 'T010', 'Ms. Harris', 'COURSE10', 'Music 101', '2006-12-11', 'B', '1110 Tenth St', 'Los Angeles', 'CA', '90010', '555-9090', 'ethan.p@example.com', '2021-09-01', 'Sophia Purple', '555-1010', 'sophia.purple@example.com', '91%', 'No');
4.3 Insert into producttbl
INSERT INTO producttbl (productID, productName, categoryID, categoryName, supplierID, supplierName, price, stock, supplierPhone, supplierEmail, warehouseID, warehouseLocation, reorderLevel, manufacturerID, manufacturerName, manufacturerPhone, manufacturerEmail, dateAdded, salesAmount, lastRestocked, status, SKU, description) VALUES
('P001', 'Laptop', 'CAT001', 'Electronics', 'SUP001', 'Tech Supply Co.', 1200.00, 50, '555-1111', 'supplier1@example.com', 'WH001', 'Warehouse A', 20, 'MAN001', 'ABC Corp', '555-2222', 'abc@corp.com', '2024-01-01', 100000.00, '2024-09-01', 'In Stock', 'SKU001', 'High performance laptop for gaming and work.'),
('P002', 'Smartphone', 'CAT001', 'Electronics', 'SUP002', 'Gadget World', 800.00, 100, '555-3333', 'supplier2@example.com', 'WH002', 'Warehouse B', 30, 'MAN002', 'XYZ Inc', '555-4444', 'xyz@inc.com', '2024-01-05', 200000.00, '2024-09-05', 'In Stock', 'SKU002', 'Latest smartphone with cutting-edge features.'),
('P003', 'Office Chair', 'CAT002', 'Furniture', 'SUP003', 'Office Supplies Co.', 150.00, 200, '555-5555', 'supplier3@example.com', 'WH003', 'Warehouse C', 50, 'MAN003', 'Furniture Ltd', '555-6666', 'furniture@ltd.com', '2024-02-10', 50000.00, '2024-09-10', 'In Stock', 'SKU003', 'Ergonomic office chair for comfortable seating.'),
('P004', 'Monitor', 'CAT001', 'Electronics', 'SUP004', 'Display Tech', 300.00, 75, '555-7777', 'supplier4@example.com', 'WH004', 'Warehouse D', 15, 'MAN004', 'Display Inc', '555-8888', 'display@inc.com', '2024-03-15', 60000.00, '2024-09-12', 'In Stock', 'SKU004', 'High-resolution monitor for clarity and color.'),
('P005', 'Desk', 'CAT002', 'Furniture', 'SUP005', 'Workstation Designs', 400.00, 50, '555-9999', 'supplier5@example.com', 'WH005', 'Warehouse E', 10, 'MAN005', 'Design Co', '555-0000', 'design@co.com', '2024-04-20', 75000.00, '2024-09-15', 'In Stock', 'SKU005', 'Stylish desk for a modern workspace.'),
('P006', 'Wireless Mouse', 'CAT001', 'Electronics', 'SUP006', 'Gadget Guys', 25.00, 300, '555-1212', 'supplier6@example.com', 'WH006', 'Warehouse F', 100, 'MAN006', 'Gadgets Inc', '555-2323', 'gadgets@inc.com', '2024-05-25', 15000.00, '2024-09-18', 'In Stock', 'SKU006', 'Compact wireless mouse for convenience.'),
('P007', 'Keyboard', 'CAT001', 'Electronics', 'SUP007', 'Input Devices Co.', 40.00, 250, '555-3434', 'supplier7@example.com', 'WH007', 'Warehouse G', 75, 'MAN007', 'Input Inc', '555-4545', 'input@inc.com', '2024-06-30', 30000.00, '2024-09-20', 'In Stock', 'SKU007', 'Mechanical keyboard with great feedback.'),
('P008', 'Router', 'CAT001', 'Networking', 'SUP008', 'Network Solutions', 100.00, 150, '555-5656', 'supplier8@example.com', 'WH008', 'Warehouse H', 20, 'MAN008', 'Network Corp', '555-6767', 'network@corp.com', '2024-07-05', 20000.00, '2024-09-25', 'In Stock', 'SKU008', 'Fast wireless router for home and office.'),
('P009', 'Webcam', 'CAT001', 'Electronics', 'SUP009', 'Video Tech', 60.00, 180, '555-7878', 'supplier9@example.com', 'WH009', 'Warehouse I', 25, 'MAN009', 'Video Inc', '555-8989', 'video@inc.com', '2024-08-10', 25000.00, '2024-09-28', 'In Stock', 'SKU009', 'HD webcam for clear video calls.'),
('P010', 'Tablet', 'CAT001', 'Electronics', 'SUP010', 'Gadget World', 350.00, 90, '555-9090', 'supplier10@example.com', 'WH010', 'Warehouse J', 10, 'MAN010', 'Gadgets Inc', '555-0202', 'gadgets@inc.com', '2024-09-15', 50000.00, '2024-09-30', 'In Stock', 'SKU010', 'Portable tablet for on-the-go use.');
4.4 Insert into ordertbl
INSERT INTO ordertbl (orderID, customerID, customerName, productID, productName, quantity, orderDate, shippingDate, shippingMethod, shippingAddress, city, state, zipCode, phone, email, totalAmount, discount, salesRepID, salesRepName, salesRepPhone, salesRepEmail, paymentMethod, status, trackingNumber, studentID) VALUES
(1, 'C001', 'Juan Dela Cruz', 'P001', 'Product A', 1, '2024-09-01', NULL, 'Standard', '111 First St, Los Angeles, CA 90001', 'Los Angeles', 'CA', '90001', '1234567890', 'juan@example.com', 1200.00, 0.00, 'S001', 'Sales Rep 1', '0987654321', 'salesrep1@example.com', 'Credit Card', 'Shipped', 'TRK001', 201),
(2, 'C002', 'Maria Clara', 'P002', 'Product B', 2, '2024-09-02', NULL, 'Express', '222 Second St, Los Angeles, CA 90002', 'Los Angeles', 'CA', '90002', '1234567891', 'maria@example.com', 1600.00, 0.00, 'S002', 'Sales Rep 2', '0987654322', 'salesrep2@example.com', 'PayPal', 'Shipped', 'TRK002', 202),
(3, 'C003', 'Jose Rizal', 'P003', 'Product C', 1, '2024-09-03', NULL, 'Standard', '333 Third St, Los Angeles, CA 90003', 'Los Angeles', 'CA', '90003', '1234567892', 'jose@example.com', 150.00, 0.00, 'S003', 'Sales Rep 3', '0987654323', 'salesrep3@example.com', 'Debit Card', 'Pending', NULL, 203),
(4, 'C004', 'Andres Bonifacio', 'P004', 'Product D', 1, '2024-09-04', NULL, 'Standard', '444 Fourth St, Los Angeles, CA 90004', 'Los Angeles', 'CA', '90004', '1234567893', 'andres@example.com', 300.00, 0.00, 'S004', 'Sales Rep 4', '0987654324', 'salesrep4@example.com', 'Credit Card', 'Shipped', 'TRK004', 204),
(5, 'C005', 'Emilio Aguinaldo', 'P005', 'Product E', 1, '2024-09-05', NULL, 'Express', '555 Fifth St, Los Angeles, CA 90005', 'Los Angeles', 'CA', '90005', '1234567894', 'emilio@example.com', 400.00, 0.00, 'S005', 'Sales Rep 5', '0987654325', 'salesrep5@example.com', 'PayPal', 'Delivered', 'TRK005', 205),
(6, 'C006', 'Corazon Aquino', 'P006', 'Product F', 3, '2024-09-06', NULL, 'Standard', '666 Sixth St, Los Angeles, CA 90006', 'Los Angeles', 'CA', '90006', '1234567895', 'corazon@example.com', 75.00, 0.00, 'S006', 'Sales Rep 6', '0987654326', 'salesrep6@example.com', 'Debit Card', 'Delivered', 'TRK006', 206),
(7, 'C007', 'Benigno Aquino III', 'P007', 'Product G', 2, '2024-09-07', NULL, 'Express', '777 Seventh St, Los Angeles, CA 90007', 'Los Angeles', 'CA', '90007', '1234567896', 'benigno@example.com', 80.00, 0.00, 'S007', 'Sales Rep 7', '0987654327', 'salesrep7@example.com', 'Credit Card', 'Pending', NULL, 207),
(8, 'C008', 'Lapu-Lapu', 'P008', 'Product H', 1, '2024-09-08', NULL, 'Standard', '888 Eighth St, Los Angeles, CA 90008', 'Los Angeles', 'CA', '90008', '1234567897', 'lapulapu@example.com', 100.00, 0.00, 'S008', 'Sales Rep 8', '0987654328', 'salesrep8@example.com', 'PayPal', 'Shipped', 'TRK008', 208),
(9, 'C009', 'Rizalina Reyes', 'P009', 'Product I', 2, '2024-09-09', NULL, 'Standard', '999 Ninth St, Los Angeles, CA 90009', 'Los Angeles', 'CA', '90009', '1234567898', 'rizalina@example.com', 120.00, 0.00, 'S009', 'Sales Rep 9', '0987654329', 'salesrep9@example.com', 'Credit Card', 'Shipped', 'TRK009', 209),
(10, 'C010', 'Antonio Luna', 'P010', 'Product J', 1, '2024-09-10', NULL, 'Express', '1110 Tenth St, Los Angeles, CA 90010', 'Los Angeles', 'CA', '90010', '1234567899', 'antonio@example.com', 350.00, 0.00, 'S010', 'Sales Rep 10', '0987654330', 'salesrep10@example.com', 'Debit Card', 'Pending', NULL, 210);
4.5 Insert into salestbl
INSERT INTO salestbl (saleID, orderID, saleAmount, saleDate, customerID) VALUES
(1, 1, 1200.00, '2024-09-01', 'C001'),
(2, 2, 1600.00, '2024-09-02', 'C002'),
(3, 3, 150.00, '2024-09-03', 'C003'),
(4, 4, 300.00, '2024-09-04', 'C004'),
(5, 5, 400.00, '2024-09-05', 'C005'),
(6, 6, 75.00, '2024-09-06', 'C006'),
(7, 7, 80.00, '2024-09-07', 'C007'),
(8, 8, 100.00, '2024-09-08', 'C008'),
(9, 9, 120.00, '2024-09-09', 'C009'),
(10, 10, 350.00, '2024-09-10', 'C010');
Verify Data Insertion
Check Tables:
To ensure the tables are created and populated correctly, you can run:
SELECT * FROM employeetbl; SELECT * FROM studenttbl; SELECT * FROM producttbl; SELECT * FROM ordertbl; SELECT * FROM salestbl;
Review Output:
- Each command will display the contents of the respective table, allowing you to verify that the dummy data has been inserted successfully.
Exit MySQL
Exit Command:
When you are done, exit the MySQL command line by typing:
EXIT;
Backup the database if needed, using mysqldump
or similar tools for future reference.
1: Open Your Command Line Interface
Windows: Use Command Prompt (cmd).
Linux/Mac: Use Terminal
2: Locate Your MySQL Bin Directory (if necessary)
Ensure that the
mysqldump
command is accessible. If it's not in your system PATH, you may need to navigate to the MySQL bin directory wheremysqldump
is located. This is often in a directory like:Windows:
C:\Program Files\MySQL\MySQL Server X.X\bin
Linux: Typically available directly in the terminal.
Log into MySQL
It's a good practice to log into MySQL to check if your database exists before creating a backup.
mysql -u your_username -p
Enter your password when prompted.
Since PowerShell does not automatically recognize commands in the current directory unless you explicitly tell it to look there. You need to use .\
before the command to specify that you're running the mysql
executable from the current directory.
Like this:
.\mysql -u monettenicolas069@gmail.com -p
Identify the Database You Want to Back Up
List all databases to identify the one you want to back up:
SHOW DATABASES;
Exit MySQL
Type
exit
orquit
to leave the MySQL shell:exit;
Use mysqldump to Back Up the Database
Now, use the
mysqldump
command to create a backup of your desired database.The syntax is as follows:
mysqldump -u your_username -p denormalized_db > backup_file.sql
Enter Your Password
After executing the command, you’ll be prompted to enter your MySQL password
Similar to the previous issue, PowerShell does not recognize commands in the current directory unless you explicitly reference them. You need to use .\
to run mysqldump
from the current directory.
Replace
your_username
with your MySQL username.Replace
your_database_name
with the name of the database you want to back up.Replace
backup_file.sql
with the desired name of your backup file.
Verify the Backup
Check that the backup file was created successfully:
On Windows, navigate to the directory where you ran the command and look for
mydatabase_backup.sql
.On Linux/Mac, you can list files in the current directory with:
ls -l
The ls -l
command is typically used in Linux or macOS environments, while PowerShell uses Get-ChildItem
(aliased as ls
or dir
). However, the -l
option is not valid in PowerShell, which is why you're getting the error.
To list the contents of the directory in PowerShell, simply use:
ls
Restore the Backup (if needed)
If you ever need to restore the backup, you can do so with the following command:
mysql -u your_username -p your_database_name < backup_file.sql
Verify the Backup File:
Navigate to the directory where the backup was created (
C:\Program Files\MySQL\MySQL Server 8.0\bin
).Ensure that
backup_denormalizedb.sql
is present in this directory.If you'd like to move the backup file to another location, you can manually copy and paste it or use the command line to move it to a safer directory.
View the Backup File Contents (Optional):
- You can open the
backup_denormalizedb.sql
file in a text editor (like Notepad or VSCode) to review the SQL dump. It should contain SQL statements that can be used to recreate thedenormalized_db
database.
- You can open the
Conclusion
Successfully created my MySQL database named denormalized_db
, defined five tables, and inserted dummy data.