Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You need to create a database and tables to store information about a company's employees, departments, and job titles. Details of tables to be created

image text in transcribedimage text in transcribed

You need to create a database and tables to store information about a company's employees, departments, and job titles. Details of tables to be created (only three tables): 1. The employees table should include fields for the employee's ID, name, address, social security number, salary, department id, and job title id. 2. The departments table should include fields for the department name and department id. 3. The job titles table should include fields for the job title name and job title id. You will also need to populate the tables with sample data (at least 5 rows each) and write SQL queries to retrieve specific data from the database. These queries should include: 1. A SELECT statement to retrieve all data from a single table 2. A SELECT statement with a WHERE clause to retrieve specific data from a single table 3. A SELECT statement with a GROUP BY clause to retrieve aggregated data from a single table 4. A SELECT statement with a HAVING clause to retrieve aggregated data based on specific conditions 5. A SELECT statement to retrieve data from multiple tables (Without using a JOIN. Use subqueries) In your submission, be sure to include all the following (one section in the solution template for each): - Schema diagram for your database (Handwritten) - SQL schema definition for each table (typed text, not images) - SQL insertion statements (quires) for each table (five per table) (typed text, not images) - SQL queries to retrieve data (see requirements above) (typed text, not images) Section 1: Schema diagram for your database (Handwritten) (Scan your handwritten schema and insert it here) (in addition type a short paragraph 50-100 words discuss your tables, keys, and arrows) Section 2: SQL schema definition for each table (in addition to the schema definition typed as text, add a short paragraph 50-100 words discuss your solution; e.g. discuss using keywords like primary key, not null, int, decimal) Section 3: SQL insertion statements (quires) for each table (five per table) (in addition type a short paragraph 50-100 words discuss your company example from which you considered employees, departments and job titles) Section 4: SQL queries to retrieve data (Write your SQL queries and explain them in short paragraph for each query)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions