Create Data modeling for the below requirements
1.
In my eCommerce application , I want to store product key benefits so that we can
get the key benefits of a product when we select a specific product.
Example:
If we have product called Nikon camera then it has benefits as below
Dynamic Fine zoom, the 20.3 MP Nikon A900 pDynamic Fine zoom, the 20.3 MP Nikon
A900 point and shoot camera makes all your photos picture-perfectoint and shoot
camera makes all your photos picture-perfect
create data modeling and flexibible search for this requirement
2.
In my eCommerce application , I want to know below information about Address of an
User
[Link] of address, like Home or Office
[Link] address is shipping address
[Link] address is billing address
3.
I need to store Area information such as name,longitude and latitude and I need to
have one area associated with each Address.
Example:
Address "Sinhgad Road, Pune, Maharashtra 411041" will have Area called "Vadgaon
Budruk" where area "Vadgaon Budruk" is the name of the area and longitude=50 and
latitude=100
4.
I want to collect the feedback from the existing customer with the information such
as
customer [Link] id, and feedback message
And i should know which customr has given what feedback
create data modeling and flexibible search for this requirement
5.
I want to add below status to an order along with Out of the box order status enum
IN_PROGRESS
NOT_DELIVERED
SUBMITTED_TO_WAREHOUSE
[Link] a customer, I want to view last 3 recently viewed products
create data modeling and flexibible search for this requirement
[Link] flexible search query to retrieve all the orders of a sepcific customer
where customer id is a placeholder param(we can pass any customer id)
[Link] flexibible search query to get all products of a specific category where
category id is a placeholder param(we can pass any category id)
SELECT {[Link]}
FROM {Order AS o JOIN Customer AS c ON {[Link]} = {[Link]}}
WHERE {[Link]} = ?customerId
SELECT {[Link]}
FROM {Product AS p
JOIN CategoryProductRelation AS cpr ON {[Link]} = {[Link]}
JOIN Category AS c ON {[Link]} = {[Link]}}
WHERE {[Link]} = ?categoryId
String query = "SELECT {[Link]} FROM {Product AS p " +
"JOIN CategoryProductRelation AS cpr ON {[Link]} = {[Link]} " +
"JOIN Category AS c ON {[Link]} = {[Link]}} " +
"WHERE {[Link]} = ?categoryId";
Map<String, Object> params = new HashMap<>();
[Link]("categoryId", "electronics"); // Replace with actual category code
FlexibleSearchQuery searchQuery = new FlexibleSearchQuery(query);
[Link](params);
SearchResult<ProductModel> result = [Link](searchQuery);
List<ProductModel> products = [Link]();
SELECT {[Link]}
FROM {RecentlyViewedProducts AS rvp}
WHERE {[Link]} = ?currentUser
ORDER BY {[Link]} DESC
LIMIT 3
String query = "SELECT {[Link]} FROM {RecentlyViewedProducts AS rvp} " +
"WHERE {[Link]} = ?currentUser " +
"ORDER BY {[Link]} DESC " +
"LIMIT 3";
Map<String, Object> params = new HashMap<>();
[Link]("currentUser", [Link]()); // Fetch logged-in user
FlexibleSearchQuery searchQuery = new FlexibleSearchQuery(query);
[Link](params);
SearchResult<ProductModel> result = [Link](searchQuery);
List<ProductModel> recentlyViewedProducts = [Link]();