Compare and contrast the three phases of database design

Assignment Help PL-SQL Programming
Reference no: EM13328914

1- Compare and contrast the three phases of database design.

2- Write an SQL select statement to list all double or family rooms with a price less than $255 per night in ascending order of price. If you have not successfully constructed the full tables Hotel, Room,Guest and Booking and fill the relevant date as required in the previous practical, you could replace your table construction and data via this SQL script.

Students may try out these two simplified queries first if they wish:

o List all rooms with a price less than $255 per night.
o List all double or family rooms with a price less than $255 per night.

3- What is the possible maximum total revenue per night from all double rooms?

NOTE: We recall that aggregate functions such as COUNT(), SUM() are applied to each group if theGROUP BY clause is present, or applied to the whole set of records if GROUP BY clause is absent.

4- List the price and type of all rooms at the Marriott hotel in London.

HINT: Use JOIN for tables Hotel and Room.

5- List the number of rooms in each hotel.

HINT: Use aggregate function COUNT(), and also make use of the GROUP BY clause.

6- Write an SQL query to update the price of all rooms by 5%.

NOTE: We recall from last week's practical that the syntax for using UPDATE can be found

a. https://www.w3schools.com/sql/sql_update.asp

b. https://www.techonthenet.com/sql/update.php

Tutorial 7: Q1, Q6, Q8-Q9 (with screenshots for the output results of the SQL).

7- Describe the purpose of normalizing data.

8- Read prac7script1.sql and draw a logical data model to illustrate the design. This file can be found under the prac link on vUWS. It may be helpful to refer to the sample data used in prac7script2.sql.

9- Write an SQL query to show the average customer balance for each area code.

Reference no: EM13328914

Questions Cloud

Can you explain how they got this : If the price elasticity of demand is 2 in absolute value, then when the price of a good x rises 25% the correct answer is the greater demand of good falls by 50%. Can you explain how they got this?
Calculate balance sheet-based accruals and cash flow-based : 1. Using Wal-Mart (publicly traded company), calculate the balance sheet-based accruals and cash flow-based accruals ratios. 2. Analyze the ratios and other information,of Wal -Mart and write an assessment of financial reportin..
What happened to the price of cancun vacation packages : If the elasticity of demand for spring break packages to cancun is -5 and if you notice that this year in cancun the quantity packages demanded increased by 10% then what happened to the price of cancun vacation packages?
The value of a home depends in part on how attractive other : The value of a home depends in part on how attractive other homes and yards in the neighborhood are. How do local zoning ordinances try to promote land uses that generate external benefits for neighbors?
Compare and contrast the three phases of database design : Write an SQL select statement to list all double or family rooms with a price less than $255 per night in ascending order of price.
How to prepare journal entries to record the events : During April, $79,000 of raw materials were requisitioned from the storeroom for use in production. These raw materials included both direct and indirect materials.
What would the cash flow diagram look like : If an alternative has monthly payments of $10,000 a month for three years with a purchase price of $75,000 at the end of year three, what would the cash flow diagram look like?
Suppose the price of the good is initially $100 : Suppose the price of the good is initially $100. What is the price elasticity of demand at this point? (Hint: What happens to the quantity demanded when the price drops by 10%?)
What is the capacitance after the slab is introduced : A slab of copper of thickness b = 2.273 mm is thrust into a parallel-plate capacitor of C = 1.00×10-11 F of gap d = 10.0 mm, What is the capacitance after the slab is introduced

Reviews

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