Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this lab, you are going to implement a graph database for a simple online electronic shop. The entities that need to be managed consist

In this lab, you are going to implement a graph database for a simple online electronic shop. The entities that need to be managed consist of products and customer details. Table 1 shows the list of products and its related category. Table 2 lists the current customers. You are required to store this information as nodes in the graph database.

The store also needs to maintain the activities of the customers. It is designed to track how many times a product has been viewed by a user, the wish list of each customer, and the list of products that have been purchased by a certain customer. Table 3 shows the list of products that each customer has viewed and the number of times each product has been viewed by the corresponding customer. Table 4 shows the list of products that have been added to the customer's wish list. Table 5 shows the products that the customers have purchased. The data listed in Table 3-5 should be stored as relationships in the graph database that you are going to build.

Table 1. Products 

NameAvailabilityShippabilityPriceCategory
Sony Experia Z22truetrue765.00Smartphones
Samsung Galaxy S8truetrue784.00Smartphones
Sony Xperia XA1 Dual G3112falsetrue229.50Smartphones
Apple iPhone 8 Plus 64GBfalsetrue874.20Smartphones
Xiaomi Mi Mix 2truetrue420.87Smartphones
Huawei P8 Litetruetrue191.00Smartphones
Acer Swift 3 SF314-51-34TXfalsetrue595.00Notebooks
HP ProBook 440 G4truetrue771.30Notebooks
Dell Inspiron 15 7577truetrue1477.50Notebooks
Apple MacBook A1534 12' Rose Goldtruefalse1293.00Notebooks
Canon EOS 6D Mark II Bodyfalsetrue1794.00Cameras
Nikon D7500 Kit 18-105mm VRtruetrue1612.35Cameras

 

Table 2. Customers

NameEmailAge
Joe B..n@example.com25 
Daniel J..j@example.com31 
Alex M..x@example.com22 
Allison Y..1@example.com24 

 

 

Table 3. Products viewed by customer

Customer

Product Viewed

View counts

JoeSony Experia Z2210
DanielSony Experia Z2210
DanielDell Inspiron 15 757720
AlexCanon EOS 6D Mark II Body20

 

Table 4. Wishlist

Customer

Product

JoeApple iPhone 8 Plus 64GB
DanielDell Inspiron 15 7577
AlexSony Xperia XA1 Dual G3112
AlexNikon D7500 Kit 18-105mm VR
AllisonAcer Swift 3 SF314-51-34TX
AllisonHP ProBook 440 G4

 

Table 5. Purchase

Customer

Product

Joe

Apple MacBook A1534 12' Rose Gold

Alex

Xiaomi Mi Mix 2

Allison

Huawei P8 Lite

Allison

Sony Xperia XA1 Dual G3112

The figure below displays the graph database you will be building in this lab.


 

B.Task

 

  1. Start the Neo4J docker container then open Neo4j Browser.

 

2.Create the nodes for Categorise and products. Include the relationships between products and categories when you create the nodes. (use the code below and continue for all remaining products)


 

Noteboo... IS IN HP ProBook 440 G4 IS IN IS IN IS IN Apple MacBook A1534 12 BOUGHT Cameras Joe Baxton Dell Inspiron 15 7577 Acer SF314... ADDED TO WISH LIST- Swift 3 ADDED TO WISH LIST IS_IN IS_IN -ADDED TO WISH_LIST Allison York Nikon D7500 Kit 18-... VIEWED ADDED TO WISH LIST Canon EOS 6D Mark II Apple iPhone 8 Plus 64GB -ADDED TO WISH LIST VIEWED BOUGHT BOUGHT Daniel Johnston VIEWED Sony Xperia XA1 Dual G31... Huawei P8 Lite VIEWED Alex McGyver ADDED_TO_WISH LIST IS IN IS_IN IS_IN Sony Experia Z22 BOUGHT IS IN Xiaomi Mi Mix 2 IS_IN Smartph... IS IN Samsung Galaxy

Step by Step Solution

3.42 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

Answer Create the Category node CREATE categoryCategory name Smartphones Create the ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Systems Analysis And Design

Authors: Joseph Valacich, Joey George

8th Edition

0134204921, 978-0134204925

Students also viewed these Databases questions

Question

Why do analysts draw multiple sets of DFDs?

Answered: 1 week ago