Classroom
Activity -[Link] Data Analysis and Visualization N sec Open with
Page 1 of 3
Activity-JSON Your work Turned in
Jansi R • Mar 17
100 points Unit-3 [Link]
PDF
Activity
Activity -[Link] JSON Unsubmit
Microsoft Word
SQL Activity: Working with JSON Data in MySQL
Class comments Private comments
�� Problem Statement:
Add comment to Jansi R
You are working as a Database Engineer at an e-commerce company. Your task is to
Add comment
create a database that stores customer orders efficiently using JSON data. Instead of
using multiple columns for product details, you will store product information inside a
JSON field in the Orders table.
�� Objective:
1. Create a table Orders with an OrderDetails column that stores product details
in JSON format.
2. Insert sample records into the table.
3. Retrieve specific details from the JSON field using SQL queries.
�� Task 1: Create the Orders Table
Write a SQL query to create the table Orders with the following columns:
OrderID (Integer, Primary Key) – Unique ID for each order.
CustomerName (VARCHAR(50)) – Name of the customer.
OrderDetails (JSON) – A JSON object storing the product name, price, and
quantity.
�� Task 2: Insert Sample Data Page 1 / 3
Write a SQL query to insert the following records into the Orders table.