Interconnecting and expressing data lab

Assignment Help Database Management System
Reference no: EM132843723

Lab - Interconnecting and Expressing Data

Overview of the Lab

One purpose of this lab it to teach you how to meaningfully relate data and to answer questions using related data, using SQL. In the prior lab you learned the fundamentals creating and using tables to store data, which is a good introduction to SQL. To be effective, however, you need to know how to work with relationships that naturally occur in the data you work with.

Section - Relating Data

1. Create the Pizza and Toppings tables, including all of their columns, datatypes, and constraints, including the foreign key constraint.

2. Insert at least four rows into the Pizza table. Two of the rows should have the values given below.

Pizza 1
name = Plain
date_available = 6/15/2020
price = $9.99
toppings: This pizza has no toppings at all.

Pizza 2
name = Veggie Delight
date_available = 9/20/2020
price = $10.99
toppings: You choose at least two veggie toppings for this pizza.

For the other rows, you insertthe ids, names, dates, prices, and toppings of your choosing (maybe you have some favorite pizzas?). Ensure that these other pizzas you create have at least two toppings.

Lastly, insert an extra topping that is not associated with any pizza, that is, the topping should be an "add-on" which is not included inany pizza's standardtoppings.

Select all rows in both tables to view what you inserted.

3. As an exercise, attempt to insert a topping that references a pizza that doesn't exist. Summarize:
a. why the insertion failed, and
b. how you would interpret the error message from your RDBMS so that you know that the error indicates the Pizza reference is invalid.

Section - Advanced Data Expression

4. Indicate the final values for each of the Boolean expressions below. You must show your work for full credit, by showing the value of each operation step-by-step.
a. (true AND false) OR (true AND true)
b. (true OR false) AND NOT(false OR false) AND (false AND true)
c. NOT((false OR true) AND NOT(true AND true) AND (false OR true))

5. Address the following scenarios.
a. Any pizza matching the following condition is considered a signature pizza for the pizza shop: Any pizza, except for the "Plain" pizza, that is available on or after 5/1/2020, with a price of $9.50 or higher, is a signature pizza.Write a query that shows the name and price of all signature pizzas.
b. The pizza shop also has one flagship pizza that sets the shop apart from other pizza shops. First, define your own conditions for this flagship pizza, making sure the conditions include the name, date, and price. Then write a query that shows the name and price of the flagship pizza. It's fine if you'd like to insert another row of pizzas to become your flagship pizza.

6. Address the following.
a. In your own words, describe the advantages of using a calculated column, when compared to placing the calculation in queries.
b. Define a new generated column named special_price, which gives a lower price for the pizza for when the pizza shop offers specials (such as on holidays or during weekly specials). You determine the percentage or fixed value discount for the special price. Then write a query that lists out the name of all pizzas, along with their regular and special prices.
c. Address #16a again in a different way. First, define a generated column named is_signature on the Pizza table, which indicates whether it's a signature pizza or not. Then write aquery that lists only the signature pizzas. Include relevant columns in the result.

Attachment:- Interconnecting and Expressing Data.rar

Reference no: EM132843723

Questions Cloud

What is the probability that kobe misses the second shot : What is the probability that kobe misses the second shot in a streak, if he has a cold hand and independent probabilities?
Calculate project npv using a discount rate of seven percent : Calculate the? project's NPV using a discount rate of 7 percent. Carson Trucking is considering whether to expand its regional service center in? Mohab.
Describe semantic and procedural memories : Describe working memory. Based on research in cognitive psychology, discuss how much information you can hold in working memory at one time.
What is the approximate percentage of students : The maximum possible score on the test was 120, while the mean score was 74 and the standard deviation was 9. (34,13.5,2.35,0.15)
Interconnecting and expressing data lab : Create the Pizza and Toppings tables, including all of their columns, datatypes, and constraints, including the foreign key constraint
Evaluating supply chain design decisions : Why is it important to consider uncertainty when evaluating supply chain design decisions?
What is the accounts receivable balance after the change : Compute the accounts receivable balance before and after the change in the cash discount policy. Determine the average daily sales.
Describe relationship between racism and privilege : Post an explanation of the relationship between racism and privilege. Furthermore, explain how the concepts of racism and privilege relate to.
Identify multiple obstacles based on your evaluation : Identify multiple obstacles based on your evaluation. Consider skill gaps, organizational culture, and resources among other things

Reviews

Write a Review

Database Management System Questions & Answers

  Evaluate the selection of a database management

Identify and describe three criteria that should be used to evaluate the selection of a database management system. Describe how an organization should use each criterion to evaluate database management system selection.

  Normalization

Using the INVOICE table structure shown in table 1, write the relational schema, draw its dependency diagram and identify all dependencies (including all partial and transitive dependencies). You can assume that the table does not contain repeating g..

  Explain new objects based on extending other objects

One of the new classes must be based on a reference extending an existing class from package task02 directly(similar to how Customer extends Person in the sample code).Do not repeat that package task02 class in the task03 package.

  Which is not a factor to consider in software evaluation

Peer reviewers are the key participants in which activity?

  Design data file grades with records of form

Input names of students from user, terminated by ZZZ, and design the data file GRADES with records of form: student (string), test1 (integer), test2 (integer), test3 (integer).

  Does every database table require a primary key

Does every database table require a primary key? Explain why or why not and provide an example to support your response.Assume that you are developing REA diagrams for a large firm. Under what cases will it NOT make sense to combine REA diagrams?

  An academic department record point

An academic department record points earned by individual students in their classes

  Describe the specialization hierarchy

Given the following business scenario, create a Crow's Foot ERD using a specialization hierarchy if appropriate. Two-Bit Drilling Company keeps information.

  How up to date should data warehouse information be

How up to date should Data Warehouse Information be.- Information timeliness is a must in a data warehouse-old and obsolete information leads to poor decision making.

  How the evolution of database technology led to data mining

Explain how the evolution of database technology led to data mining. Describe the steps involved in data mining when viewed as a process of knowledge discovery.

  Update the initial database to include six additional tables

Update the initial database to include six additional tables as shown in the first diagram. Submit a consolidated Word document with all screenshot and the DDL.

  Calculate the ranking score for each of the ten documents

Calculate the ranking score for each of the ten documents based on each of the following query-document similarity measures - How does ranking compare with ranking obtained using the cosine similarity measure in Exercise 20? If there are differences..

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