Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL Oracle help: We are going to create tables for a company to track employees, the departments they work for and the projects they work

SQL Oracle help:
We are going to create tables for a company to track employees, the departments they work for and the projects they work on. When creating the tables you may use any field make sure you think about your data types carefully. Do not create primary key fields or any other integrity or referential checks if prompted to do so. Read throngh the whole lab and decide on your data types and column names before you start creating tables in the database. NOTE: Yon do not need to show me anything for this section (Part I)
Create an employee table with the following fields: an employee_id (this column should not allow nulls), last_name, first_name, address, state, zip code, salary, employee type, department_id.
Create a department table with the following fields: a department id (this column should not allow nulls), a department name, a state, a room number
Create a projects table with the following fields: a project id (this column should not allow nulls), a project name, building_number, a project type
Create an emp_proj table with the following fields: an employee_id, a project_id, hours.
Part II - Putting Data into the tables For this section only show me #5
Insert 3 departments into your department table; Software, Hardware, and Installations. Give them ids, room numbers, states ('MD','NY','DC')
Insert 8 fictitious employees into your employee table using department ids from your department table (put the employees in valid departments) Please make sure you use your own name as one of the employees and use my name as one of the employees. You should also have at least 2 employees from each department and use states of 'MD,'NY','DC'. Salary should be between 100 and 100000. Employee type should be "Full Time', 'Temp' or 'Part Time', emplo
Insert 3 projects into your project table; PROJ-A, PROJ-B, PROJ-C. You can make up building numbers. Project types should be: Research, Mainenance, Facilities
Populate the emp proj table making combinations of employees working on projects. Make sure each employee is working on at least 2 projects and that their total hours do not exceed 40.
Run a Select * from your employee table. Run a Select * from your department table. Run a Select * from your project table. Run a Select * from your emp proj table.
image text in transcribed

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

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

Students also viewed these Databases questions