Return the names of employees who lives in baltimore

Assignment Help Database Management System
Reference no: EM131321602

Assignment

Consider the employee database with the following list of tables. Please create these tables with appropriate primary keys & foreign keys.

The list of tables is:

Company(cid, company_name, city, state) /* city is the company's location */

Employee(eid, ename, street, city, state, salary, cid) /* city is where the employee lives*/

Manages(eid, mid) /* mid is manager's ID*/

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

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

Task 1: Return the names of employees who lives in Baltimore. If you do not have Baltimore as a city name in Employee table, use any city name you have (e.g., New York).

Task 2: Return the names of all employees whose company is in Baltimore. If your Company table does not have companies located at Baltimore, use any city name in your Company table (e.g., New York).

Task 3: Return the number of companies located in each city.

Task 4: Return the names of cities with at least two companies located.

Task 5: Return the names of companies and the number of employees working at each company.

Task 6: Return the names of employees of Verizon who are managers. Hint: managers are also employees but their eid appears as mid in manages table. If you do not have Verizon as a company name, use any company name in your company table.

Reference no: EM131321602

Questions Cloud

Prepare journal entries to record the flow of manufacturing : Prepare journal entries to record the flow of manufacturing costs through the standard cost system and the related cost variances. Make separate entries to record the costs of direct materials used, direct labor, and manufacturing overhead.
Find the internal resistance of the battery : A battery having an emf of 10.99 V delivers 83 mA when connected to a 65.4 ? load. Find the internal resistance of the battery. Answer in units of ?.
How it differs from s-http and ip sec : SSL3.0 has been transformed into TLS 1.0. Study the TLS protocol specifications and show how all are met by SSL. There are some differences in the protocol specifications of the two. Describe these differences.
Describe any unintended consequences : Analyze current and projected initiatives to improve quality while simultaneously controlling costs. Describe any unintended consequences
Return the names of employees who lives in baltimore : Return the names of employees who lives in Baltimore. If you do not have Baltimore as a city name in Employee table, use any city name you have (e.g., New York).
How tragic incident affect financial investors and markets : How does this tragic incident affect financial investors and markets? What could you do to help reduce the risk of such an investment problem?
Which the market will cease to exist : Howell Petroleum is considering a new project that complements its existing business. The machine required for the project costs $3.90 million. The marketing department predicts that sales related to the project will be $2.60 million per year for the..
Nanotechnology-understanding small systems : At what temperature do most cells prefer to live? The calorie is a unit of energy defined as the amount of energy needed to raise 1 g of water by 1°C. A bacterium (which is mostly water) weighs about 1 pg.
Create an ms word document containing a hierarchy chart : First, create an MS Word document containing a hierarchy chart and a data flow diagram to organize your program modules. Second, create a pseudocode program using Notepad++ to solve this problem.

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  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

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

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

  Practice on topic of normalization

Practice on topic of Normalization

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