Question

Please provide a SQL Table diagram with their relationships based on the following prompt: Consider the...

Please provide a SQL Table diagram with their relationships based on the following prompt:

Consider the design of a database for an online store. Each item is identified by a unique item ID, a title, a description of the item, the date the item is posted, price, and a list of categories (each category is a single word in lower cases). Only registered users can post, buy, and review an item. Each registered user is identified by a user ID, a password, a first name, a last name, an email, the gender, and his/her age. A user can give at most one review for each item, and on a particular day, the user can post at most 5 items and 5 reviews. Meanwhile, an item can have no or many reviews. The review given by a user provides a score of “Excellent, Good, fair, or poor” and then a short remark. A user cannot modify an existing review that she/he gave earlier. One special user called “root” is designated as the administrator user. The root user can ban any other user into a black list. Once banned, a user will not be able to login into the system unless he/she is unbanned from the blacklist subsequently. In addition, each user has two dynamic lists: my favorite sellers and my favorite items, which can be modified by the user when necessary by insert, delete or update. Each user can add items to the shopping cart and a shopping cart the total price of the items is calculated automatically. The shopping cart can be modified by the user when necessary by insert, delete, or update.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is diagram..

Item to category is one to many realtionship because one item can have many category.

Item to user is one to many because user can post many items but post date and userid together is unique key as one use can post only one item a day.

User to review is one to many but reviewId and itemId together is unique key.

I have drawn diagram roughly.

That gives you idea you can edit it and make it more precise.

All the important things are covered in the diagram.

Hope this is helpful.

Thank you.

Add a comment
Know the answer?
Add Answer to:
Please provide a SQL Table diagram with their relationships based on the following prompt: Consider the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Solve the code below: CODE: """ Code for handling sessions in our web application """ from bottle import request, response import uuid import json import model import dbsche...

    Solve the code below: CODE: """ Code for handling sessions in our web application """ from bottle import request, response import uuid import json import model import dbschema COOKIE_NAME = 'session' def get_or_create_session(db): """Get the current sessionid either from a cookie in the current request or by creating a new session if none are present. If a new session is created, a cookie is set in the response. Returns the session key (string) """ def add_to_cart(db, itemid, quantity): """Add an...

  • I need help writting a Javascript function that does the following its for a HTML/CSS Shopping...

    I need help writting a Javascript function that does the following its for a HTML/CSS Shopping Cart Page CODE This page contains a list of the selected products that includes an image, name, price, quantity, and cost) Because the process is implemented not as real, three products along with its image and price are displayed on the page. The product ID of each product is stored in a hidden textbox. The default amount of each product is 1 and the...

  • This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program).

    Ch 7 Program: Online shopping cart (continued) (Java)This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program).(1) Extend the ItemToPurchase class per the following specifications:Private fieldsstring itemDescription - Initialized in default constructor to "none"Parameterized constructor to assign item name, item description, item price, and item quantity (default values of 0). (1 pt)Public member methodssetDescription() mutator & getDescription() accessor (2 pts)printItemCost() - Outputs the item name followed by the quantity, price, and subtotalprintItemDescription() - Outputs the...

  • PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create...

    PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create the schema, and package. 2. Create users x1 and x2 who are the participants in the auction. They will need acces to the package. 3. Bid on the same item and record your observations. Verify all scenarios. Upload the files with the missing code and a detailed sample run. AUCTION OWNER.TXT SQL> conn / as sysdba Connected. SQL> drop user xyz cascade; User dropped....

  • please use Java!! We are storing the inventory for our fruit stand in a hash table....

    please use Java!! We are storing the inventory for our fruit stand in a hash table. The attached file shows all the possible key/fruit combinations that can be inserted into your hash table. These are the real price lookup values for the corresponding fruit. Problem Description In this programming assignment, you will implement a hash table class fruitHash. Your hash table must include the following methods: 1) hashFunction(key) This method takes a key as an argument and returns the address...

  • Overview This lab provides you the opportunity to insert and update data with the use of SQL comm...

    Overview This lab provides you the opportunity to insert and update data with the use of SQL commands. The lab will utilize the FLIX2YOU problem, the current schema. In order to start this lab, you must have successfully completed Lab # 6. In Lab # 6, you executed a script that was provided to you. This script created 7 of the FLIX2YOU tables as documented in the Entity Relationship Diagram in the FLIX2YOU problem document. The second part of lab...

  • DATABASE SYSTEMS Project INDIVIDUAL WORK DELIVERABLE #: SUBMISSION DATE No Group Work Allowed Apr...

    DATABASE SYSTEMS Project INDIVIDUAL WORK DELIVERABLE #: SUBMISSION DATE No Group Work Allowed April 8 Introduction to Coursework You have been approached by a University for the design and implementation of a relational database system that will provide information on the courses it offers, the academic departments that run the courses, the academic staff and the enrolled students. The system will be used mainly by the students and the academic staff. The requirement collection and analysis phase of the database...

  • Using C++ in Visual Studios Rewrite the code to use a Stack instead of a Queue....

    Using C++ in Visual Studios Rewrite the code to use a Stack instead of a Queue. You will need to think about the differences in the Stack and Queue. Think about how they operate and how the nodes may differ.   Modify the code as necessary. You will need to push to the Stack, pop from the Stack, peek at the Stack. You will need a member functions like in the example code. Your program will need to show that everything...

  • can someone help with the blue reader project, please? I have the journal entries I need...

    can someone help with the blue reader project, please? I have the journal entries I need help with journal ledger and trial balance so I can I do the financial statements. thanks can someone help me the ledger and trial balance please, I posted all the information about the picture Credit The accounting cycle illustrated below is designed to provide information about a company's profitability for lack thereof) along with many other important financial characteristics. This same accounting Cycle is...

  • I had a question about Step 5-9. I already completed the general journal with the entries...

    I had a question about Step 5-9. I already completed the general journal with the entries into the general ledger. Now I need help creating the adjusted trial balance, I cant get it to equal to $20,743. Also, I need help completing the financial statements: income statements, statement of owners equity, and a balance sheet. *Net Income has to equal $1024 and total assets has to equal $18,354. The question is how can I balance out my adjusted trial balance...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT