question archive Use the Relational Data Model to design a database that stores customers’ online activity
Subject:Computer SciencePrice:4.87 Bought7
Use the Relational Data Model to design a database that stores customers’ online activity.
• customers book purchases
• reviews
• ratings
Complete the following-
*List the relationships between your entities
*List any relationship-specific attributes.
*Convert your set of entities, attributes and relations into a database schema.
*Specifically, write down the table names, the columns in each table, and specify which columns are primary keys and which ones are foreign keys.
*Using your database design, write an SQL query to retrieve the customer ID's (or customer names, either is fine) of all customers that gave the book "Alice in Wonderland" a rating of 5. Using your database design, write an SQL query to insert a new purchase done by customer John Smith, whose ID is 1234, to the book "The Three Musketeers", whose ID is 5678.

Answer:
SELECT CId FROM Customer C
JOIN Purchases P on C.CId = P.PId
JOIN Book B on P.BId = B.BId
WHERE B.BName = 'Alice in Wonderland' AND P.Rating =5;
INSERT INTO Customer VALUES (1234,'John Smith');
INSERT INTO Book VALUES(5678,'The Three Musketeers');
INSERT INTO Purchase VALUES(1234,5678,null,null);
please use this google drive link to download the answer file.
https://drive.google.com/file/d/1D3keUVgjMqJk1Z5e7o39P8DE3Yjr4fAk/view?usp=sharing
note: if you have any trouble in viewing/downloading the answer from the given link, please use this below guide to understand the whole process.
https://helpinhomework.org/blog/how-to-obtain-answer-through-google-drive-link

