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.
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.
|