0% found this document useful (0 votes)
4 views1 page

Activity JSON Classroom

The document outlines a SQL activity for creating and managing a database using JSON data in MySQL for an e-commerce company. It includes a problem statement, objectives, and tasks for creating an Orders table with a JSON column for product details, as well as inserting and retrieving data. The activity is designed for a Database Engineer role and emphasizes efficient data storage and retrieval methods.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Activity JSON Classroom

The document outlines a SQL activity for creating and managing a database using JSON data in MySQL for an e-commerce company. It includes a problem statement, objectives, and tasks for creating an Orders table with a JSON column for product details, as well as inserting and retrieving data. The activity is designed for a Database Engineer role and emphasizes efficient data storage and retrieval methods.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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.

You might also like