Determine columns that make up the primary key

Assignment Help Database Management System
Reference no: EM1350402

Q1) Perform the following tasks below by using the correct SQL statements. Create the statements in Oracle by using the following steps (SQL > SQL commands > Enter Command). Once your command is error-free, copy and paste your statements into this assignment document. Upload this Word document for grading.

All questions should be answered with one SQL statement. Use the new Join syntax.

1. Find the columns that make up the primary key of the l_lunch_items table. Sort the columns by position. (Do this in one statement).

2. List all the lunches that employees have signed up for. Show me first_name, last_name, lunch_date, and product_code of the items they ordered. Do not include employees who don't have a manager.
Sort the rows by product_code.

3. From the employees table, list the employee_id, last_name, and phone_number of every employee, along with the last_name and phone number of his manager. Sort the rows by employee_id. (Hint...tables can be joined to themselves...just give each table a different alias).

4. Similar to 3, but include rows for the people who do not have managers.

5. Count the number of foods supplied by each supplier. List all the suppliers. Show the supplier_id, supplier_name, and number of foods from each supplier. Sort the rows on the supplier_id.

6. Count the number of employees who work in each department. List all the departments. Show the department code, department name, and the number of employees. Sort on the dept_code.

Reference no: EM1350402

Questions Cloud

Treatment of a sensorimotor disorder : I need assistance regarding the treatment of a sensorimotor disorder. Can you compare and contrast the different approaches to treating the disorder that can be identified as it relates to its effectiveness of treatment?
Recruiting motivation and managerial actions : Write Walter's parents, stressing that the scholarship will cover all of his tuition, room and board, and book expenses.
Principle motives for holding cash-near cash assets : Briefly identify and explain the principle motives for holding cash and near cash assets. What are the risk-return trade-off associated with inventory management?
What is the potential energy of the system : At the instant the alpha particle leaves the nucleus, the centers of the two are 7.5 apart and essentially at rest. Find their speeds while they're a great distance apart. Treat each particle as a spherical charge distribution.
Determine columns that make up the primary key : Carry out the following tasks below by using the correct SQL statements. Create the statements in Oracle by using the following steps (SQL > SQL commands > Enter Command). Determine the columns that make up the primary key of the l_lunch_items tabl..
Explain what value would it be to know were going : Explain What value would it be to know that you were going to be training a class of persons between the ages of 20 and 35?
Determine additional funds needed : Suppose that Marbell Corporation is operating below capacity, calculate the amount of new funds required to finance this growth. Marbell has an 8 percent return on sales and 70 percent is paid out as dividends.
Mental-physical and spiritual health : How realistic is it to expect health care workers to model mental, physical, and spiritual health? If Americans tend to be overweight, underactive workacoholics who experience burnout, why should health care workers be any different?
Individual motivations - case studies : Eval whether the individuals will be motivated to behave as desired. Then select the appropriate managerial action from those listed.

Reviews

Write a Review

Database Management System Questions & Answers

  Design a set of 3nf tables for your database scenario

Draw an ER diagram for your database scenario. Design a set of 3NF tables for your database scenario.

  Determine the names of all tracks from table

All primary keys are underlined. All foreign keys have same name as primary key that they are referencing. Determine the names of all Tracks which are more than 10 minutes (600,000 ms) long.

  First - second or third normal form

How many entities are shown by this relation?

  Determine a list of n numbers has no duplicates

Express given five loosely described problems carefully in { Instance, Question } form as utilized in "Computers and Intractability". Determine that a list of n numbers has no duplicates.

  Create structurally sound relational database schema

Create a structurally sound relational database schema showing the minimum number of fields, tables, and relationships between the tables.

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Analyse a set of data and write a memo

To analyse a set of data, and write a memo, identifying and explaining your insights into the operation of Todd Restaurants.

  Patients post cardiac bypass surgery

Monitor Renal Outcomes in patients post cardiac bypass surgery?

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Translation from erd to the relational model

Complete (i.e., reverse engineering) ER diagram below such that 4 relation schemas above are exactly result of a translation from the ERD to the relational model.

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

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