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

  Describe the purpose of the database

Describe the purpose of the database. Based on your research and / or common knowledge of a college and the information tracked by a college, describe the entities of the database and the attributes of each entity.

  Online transactions versus a data warehouse optimized

Outline the main differences between the structure of a relational database optimized for online transactions versus a data warehouse optimized for processing and summarizing large amounts of data

  How to change content in order for new list

To what kind of list would you change it? What would you require to change about content in order for new list type to be effective for purpose of list?

  Relational algebra operations

List the sequence of relational algebra operations needed to implement the queries.

  Sketch object-oriented model for private airport database

Sketch an object-oriented model for a small private airport database that is used to keep track of airplanes, their owners, airport employees, and pilots.

  Advantages of using an object-oriented database

From the e-Activity, select an organization, and explain the advantages and disadvantages of using an object-oriented database and a NoSQL database in its marketplace

  Define the database life cycle

Per the text, the Database Life Cycle includes the Database Initial Study, Database Design, Implementation and Loading, Testing and Evaluation, Operation, and Maintenance and Evolution phases.

  Implement a set of classes for a firm

Implement (write and test code) a set of classes for a firm. The firm has three kinds of employees. All employees have the following information need to be recorded name, SSN, title, base salary.

  What is a conceptual design process

When designing and developing a database, it is imperative that we utilize a conceptual design process. What is a conceptual design process

  Discuss two of the additional dba responsibilities mentioned

Write a 500-1000 word paper using Word discussing two of the additional DBA responsibilities mentioned. Create and populate the following three database tables, including foreign keys, using SQL

  Create the primary and foreign key using a uml class diagram

Create the primary key and foreign keys using a UML Class diagram for each table and compare and contrast the key aspects that each system offers

  Consider the following set of database tables same tables

consider the following set of database tables same tables from assignment 6-1. please take note of foreign keys most of

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