Please create the tables with appropriate

Assignment Help PL-SQL Programming
Reference no: EM131231548 , Length:

Please submit SQL statements as text file. You do not need to show screen shot. Make sure you have tested your SQL statements in Oracle.

Problem 1. Please create the following tables with appropriate primary keys & foreign keys.

The list of tables is:

- Users table with 3 columns: userid (user id), username, password;
- Category table with 2 columns: cid (category id), cname (category name, for example, TV, cell phone, laptop).
- Product table with 5 columns: pid (product id), cid (category id),pname (product name), brand (brand of product), price.
- Feature table with 2 columns: fid (feature id), fname (feature name). E.g., screen size, weight, memory size, hardisk size.
- Product_feature table with 3 columns: pid (product id), fid (feature id), fvalue (feature value), you can assume that feature values are numerical
- Review table with 6 columns: rid (review id), userid (user id), pid (product id), rdate (review date), score (review score from 1 to 5), rcomment (review comments)

Problem 2. Insert at least three rows of data to each table. Make sure you keep the primary key and foreign key constraints.

Problem 3. Please write ONE SQL statement for each of the following tasks using tables created in Problem 1. [50 points, 10 points each]

Task 1: Return the total number of reviews

Task 2: Return all reviews submitted after 2016-5-1.

Task 3: Return product names under the category TV.

Task 4: return the product name and average score.

Task 5: Return the names of product under the category TV and with average rating above 4.0

Verified Expert

In the given questions there are detail of a company which is having its product and its features detail .By the given detail I have to design a database.So in the solution I have written create statement to create tables for the database and in 2nd question I have written insert statement to insert data for the tables .And in last question I have written queries for given questions.

Reference no: EM131231548

Questions Cloud

What are the annual payments of a self-amortization loan : If the initial extra cost of a solar system is $5,000, what are the annual payments of a self-amortization loan if the interest rate is 12%, the inflation rate is 4%, and the mortgage term is 15 years.
Create mock-ups of all expected deliverables : Define the problem in a business point of view as well as what you want to achieve out of this such as OLAP activities (Aggregation, roll-ups, slicing, dicing, etc.) and reports. Create mock-ups of all expected deliverables (Charts, graphs, diagrams,..
Law relate to the concept of price elasticity : The phenomenon of ‘faster, cheaper’ computing is often referred to as Moore’s Law after Gordon Moore, a cofounder of Intel. What is Moore’s Law? What does it apply to? What is price elasticity and how does Moore’s Law relate to the concept of price e..
Prepare the total cost curve and specify cost optimal system : prepare the total cost curve and specify the cost optimal system. Assume that the backup fuel is fuel oil at $7/GJ and that the fuel price is inflating at 8%/year. The total energy demand for which the solar system is constructed is estimated to b..
Please create the tables with appropriate : Please create the tables with appropriate primary keys & foreign keys - Insert at least three rows of data to each table. Make sure you keep the primary key and foreign key constraints.
Describe a person or object that has special meaning in life : Describe a person, place, or object that has special meaning in your life. Describe a particular moment or occurrence in your life that had special meaning to you.
Compare the capital costs and levelized costs of operation : The PV system is to use thin film technology currently available. Neglect the cost of nuclear fuel. Comment on environmental impact and availability of water.
Explain how you would write a job description : Why is strategic planning important to all managers? List five specific examples of what should be included in the management planning process. Explain how you would write a job description.
Describe governors roles in influencing budgetary process : Discuss three of the governor's legislative powers. Explain which power is most important and why. Describe the governor's roles in influencing the budgetary process.

Reviews

inf1231548

10/8/2016 8:18:00 AM

That's good work, all the queries are working fine. I should concede that I was suspicious about this anticipate, however I am happy to have utilized your service. I have another venture coming up, double the length, and I am sure that I will enlist ExpertsMind.com to help me with it. Much thanks to you

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd