Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Ben and Jerry is happy with your efforts and wants to extend your contract.

THEY WANT YOU TO INCPRPORATE THE FOLOWING INFORMATION IN YOUR DATABASE

In addition to the current three tables, ICECREAM, RECIPE and INGREDIENT, they have one additional table CUSTOMER that needs to be integrated in the database. Purpose is to keep track of customer's ice cream flavor preferences.

CUSTOMER (Cust_ID, Cust_name, year_born)

They want to link CUSTOMER to their database. Customer flavor preference is shown in table 2.

Following tables are from assignment 1

ICECREAM (Ice_cream_ID, Ice_cream_flavor, price, years_first_offered, sellling _status)

INGREDIENT( Ingredient_ID, Ingredient_name, cost)

RECIPE (Ice_cream_ID, ingredient_ID, quantity_used)

 WHERE:

Ice_cream_ID is the internal Id given to an ice cream.

Ingredient_ID is the internal Id given to an ingredient

selling_staus is an internal control which keeps track of ice cream sales as high, low, medium or none. If no figures are available this field has no value.

Years_first_offered is the year that ice cream was first offered

quantity_used is the amount of ingredient used in a given ice cream.

Table 1: CUSTOMER

CUST_ID

CUST_NAME

Year_born

1

Harry, T

2002

2

Sally, P

1992

3

Lio, L

1998

4

Patel, P

2001

5

Roner,K

1978

6

Jackson, O

2002

7

Long, P

2001

8

Smith, G

1992

9

Harry, L

2002

10

Paner, K

1978

11

Dan, U

2010

12

Patel, M

2001

Table 2: CUSTOMER and their Flavor preference

Name

Flavor preference

Harry, T

Vanilla, Coconut

Sally, P

Almond, Vanilla, Cookie

Lio, L

Banana, Green Tea, Mint

Patel, P

Cherry, Coconut

Roner,K

 

Jackson, O

Cherry, Coconut

Long, P

 

Smith, G

Berry, Vanilla, Mint, Cookie, almond

Harry, L

Mint

Paner, K

 

Dan, U

Coconut, Vanilla, Cherry

Patel, M

Coconut

You are to perform the following using ORACLE available at UB:

PART A: create tables and load data

a) Create CUSTOMER table and create table that will link customer to their ice cream preferences. Make sure to include appropriate primary and foreign keys. You can use customer_ID and Ice_cream_id to link customer to flavors.

Part B  Provide Table structure

Part C: Provide table contents

Part D: Develop queries in ORACLE and provide its output

All queries MUST be based SOLELY on the information provided and each question must use a SINGLE query. No views or separate queries, unless otherwise stated.

As always all queries should be data independent.

c) Answer the following queries in SQL:

1. Give the names of customers who are using ice creams that have cocoa as their ingredient.

2. Give the flavor of ice creams that were introduced before customer Roner, K was born

3. Ben and Jerry want to discontinue flavors that none of their current customer like. Give a list of those flavors.

4. Give the count of customers that like exactly two flavors.

5. Ben and Jerry are stating a new flavor, a mix of Vanilla, Cookie and almond. List the names of customers that like either of these flavors.

6. Give the names of flavors that cost more than $500 (total).

7. Give the names of customers that like both Cherry and Vanilla flavors. (note: it is NOT either/Or but AND) (hint: think of UNION, INTERSECT, MINUS)

8. Give the count of employees that do not have any flavor preference.

9. Get the number of customers that have same preference as Harry, L.

10. Give the total cost of each flavor.

BONUS:

BONUS:  Related to Q9..Give the names of customers that have EXACTLY same preference as  Patel, P.  (note if customer Patel has two flavor preference, then we want names of customers who also prefer either or both of those flavors).

PART E:

Draw one complete ERD of all entities from assignment 1 and 2.

Attachment:- Assign 1.pdf

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M91708481

Have any Question?


Related Questions in DBMS

Question team project submission - submit to the unit 4

Question: Team Project Submission - Submit to the Unit 4 Group Project Area This version of the capstone project assignment is FOR GRADING this week. Submit to the group area the document containing completed Sections On ...

Objectivethe objective of this lab is to be familiar with a

OBJECTIVE: The objective of this lab is to be familiar with a process in big data modeling. You're required to produce three big data models using the MS PowerPoint software. This tool is available on UMUC Virtual Deskto ...

Assignmenta restaurant is designing a database to keep

Assignment A restaurant is designing a database to keep track of customer services. A customer is defined as a customer ID, name, address and a telephone number. Customers are served by employees. Each employee is define ...

Assignment -scenario setup a mock phase 3 clinical trial

Assignment - Scenario: Setup a Mock Phase 3 Clinical Trial for evaluating the efficacy of a Blood Pressure/Weight Loss/ or Muscle Strength Enhancement supplement. Assume that the testing takes place at a physician's offi ...

Data model development and implementationpurpose of the

Data model development and implementation Purpose of the assessment (with ULO Mapping) The purpose of this assignment is to develop data models and map Database System into a standard development environment to gain unde ...

Question a suppose you are a marathon runner that can run a

Question : a) Suppose you are a marathon runner that can run a maximum of n miles on a single bottle of water. You are given a map of your marathon route with all the water stations marked. Design an efficient algorithm ...

Sqlwrite a select statement that returns three columns from

SQL Write a SELECT statement that returns three columns from the Vendors table: VendorContactFName, VendorContactLName, and VendorName. Sort the result set by last name, then by first name.

Football association of zambia faz super leaguethe faz has

Football Association of Zambia (FAZ) Super League The FAZ has recently decided to reorganise their operations to support both existing and possibly expanded league operations in Zambia and part of preparation for the 201 ...

Question we can sort a given set of n numbers by first

Question : We can sort a given set of n numbers by first building a binary search tree containing these numbers (using TREE-INSERT repeatedly to insert the numbers one by one) and then printing the numbers by an inorder ...

You can work on this assignment individually or in a group

You can work on this assignment individually or in a group of 2. If you are working in a group please establish a group in Assignment 2 Group on Canvas In this assignment you are asked to explore the use of neural networ ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As