Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using SQL in Oracle ACTIVITY #1 - CREATING TABLES AND INSERTING DATA 1. Create the DEPARTMENT table based on the following table instance chart. Ensure

image text in transcribed

image text in transcribed

Using SQL in Oracle

ACTIVITY #1 - CREATING TABLES AND INSERTING DATA 1. Create the DEPARTMENT table based on the following table instance chart. Ensure you give each constraint an appropriate name. Enter the syntax in a script called pigl.sgl. then execute the script to create the table. Confirm that the table is created. Column Name Id Name PK NN NN Key Type Nulls/Unique FK Table FK Column Number Data Type Length Varchar2 25 7 2. Insert the following records into the DEPARTMENT table. Id Name Finance 100 200 Accounting 300 Human Resources 400 Payroll . 3. Create the EMPLOYEE table based on the following instance chart. Ensure you give each constraint an appropriate name. Enter the syntax in a script called pla3.sal, and then execute the script to create the table. Confirm that the table is created. Column Name ID LAST_NAME FIRST_NAME DEPT_ID FK Key Type PK Nulls/Unique NN FK Table NN NN DEPARTMENT FK Column ID Number Varchar2 Number Data Type Length Varchar2 25 7 25 7 4. Modify the EMPLOYEE table to allow for longer employee last names (the field needs to allow 40 characters instead of 25). Confirm your modification. ACTIVITY #2 - VIEWS 5. Create a view called EMP_VU based on the employee number, employee name, and department number from the EMP table. 6. Display the contents of the EMP_VU view. 7. Using your view EMP_VU, enter a query to display all employee names and department numbers. 8. Delete the view EMP_VU

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_2

Step: 3

blur-text-image_3

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

20. Are events A and C independent? Mutually exclusive?

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago