Write the sql code that will save the changes

Assignment Help Database Management System
Reference no: EM13512984

1. At this point in the design process, you would have a detailed physical schema created for a database. How would you approach converting your schema into a database, complete with sample data? Explain your approach in two to three paragraphs.

2. Test your SQL code using Oracle XE. Once you are certain that your SQL code performs the desired tasks

Write the SQL code that will create the table structure for a table named EMP_1. This table is a subset of the EMPLOYEE table. The basic EMP_1 table structure is summarized in the following table. (Note that the JOB_CODE is the FK to JOB.)

ATTRIBUTE(FIELD)NAME

DATA DECLARATION

EMP_NUM

CHAR(3)

EMP_L NAME

VARCHAR( 1 5)

EMP_F NAME

VARCHARI 151

EMP _INITIAL

CHAR(1)

EMP_HIREDATE

DATE

JOB_CODE

CHAR(3)

2. Having created the table structure in Problem 1, write the SQL code to enter the first two rows for the table shown in Figure P7.2.

1677_Physical schema created for a database.png

3. Assuming that the data shown in the EMP_1 table have been entered, write the SQL code that will list all attri­butes for a job code of 502.

4. Write the SQL code that will save the changes made to the EMP_1 table.

5. Write the SQL code to change the job code to 501 for the person whose employee number (EMP_NUM) is 107. After you have completed the task, examine the results and then reset the job code to its original value.

6. Write the SQL code to delete the row for William Smithfield. who was hired on June 22. 2004. and whose job code is 500. (Hint: Use logical operators to include all of the information given in this problem.)

7. Write the SQL code that will restore the data to its original status; that is. the table should contain the data that existed before you made the changes in Problems 5 and 6.

8. Write the SQL code to create a copy of EMP_ 1. naming the copy EMP_2. Then write the SQL code that will add the attributes EMP_PCT and PROJ_NUM to the structure. The EMP_PCT is the bonus percentage to be paid to each employee. The new attribute characteristics are:

EMP_PCT                        NUMBER(4,2)

PROJ_NUM CHAR(3)

Verified Expert

Reference no: EM13512984

Questions Cloud

Compare the total annual costs of product x : Compare the total annual costs of Product X using both the traditional volume-based and the new ABC systems.
Define macroevolution : why is it not surprising that some species can interbreed with one another while others can not? (Why is it the dog and the wolf can but the dog and a dolphin can not?) Define macroevolution and how your explanation relates to macroevolution.
Compute the maximum cu(2+) contamination os : Calculate the maximum Cu(2+) contamination os the acid in moles Cu(2+) per liter. What is the corresponding contamination if the hydrogen partial pressure is reduced to 10^-4 atm
Evaluate the magnitude of the charge on each of sphere : Two equally charged spheres are located 2 cm away from each other. what is the magnitude of the charge on each of sphere
Write the sql code that will save the changes : Write the SQL code to delete the row for William Smithfield and write the SQL code that will save the changes
Evolutionary systematics and cladistics problem : Define each of the two approaches to classifying and interpreting lifeforms: evolutionary systematics and cladistics. Im having trouble understanding this question.. "Define each of the two approaches to classifying and interpreting lifeforms: evol..
How much profits increase because of quality improvements : Prepare the one-year trend report that corporate management requested. How much did profits increase because of quality improvements made in 19x9 (assuming that all reductions in quality costs are attributable to quality improvements)?
Define the reaction and at what activity ratio : Zn is immersed in a solution of CuCl2. What is the reaction and at what activity ratio of Zn(2+) / Cu (2+) will the reaction stop
What frequency sound does this string produce : One string of a certain musical instrument is 80.0cm long and has a mass of 8.72 g. It is being played in a room where the speed of sound is 344m/s, What frequency sound does this string produce in its fundamental mode of vibration

Reviews

Write a Review

Database Management System Questions & Answers

  Draw at a context diagram and a level-0 diagram

Draw at a context diagram and a level-0 diagram. In drawing these diagrams, if you discover that the narrative is incomplete, make up reasonable explanations to complete the story. Provide these extra explanations along with the diagrams.

  Relational database concepts and applications

Relational Database Concepts and Applications

  How to use spool command

How to interactively query a database by using SQL statements and SQL*PLUS commands and how to use spool command to save an interactive session within SQL*PLUS.

  Explain the concept of physical data independence

Explain the concept of physical data independence and its importance in database systems,  List four significant differences between a file-processing system and a DBMS.

  Explain steps of process in increasing cardinalities

When increasing cardinalities from 1:N to N:M, which of the given steps are included in process the order of steps listed below is not relevant, only steps themselves?

  Explain the need for key restructuring

Give at least three reasons why ETL functions are most challenging in a data warehouse environment.

  1 explain the concept of physical data independence and its

1. explain the concept of physical data independence and its importance in database systems2. explain what problems are

  Define database systems and data warehouses

Describe how that firms likely use or should use Management Information Systems, Information Systems and Information Technology as it relates to the various topics covered in the class.

  Define calculations and format the table

internship at Mountain View Realty, a real estate firm that focuses in the North Utah County area. The previous intern developed a spreadsheet listing houses listed and sold during the last several months. She included addresses, location, list pr..

  Explain a minimum of three 3 heuristics to optimize

your supervisors and customers are very impressed with the database you have put together. however there is still that

  Write down advantage in storing metadata in tables

What is meant by a Metadata? How does this term pertain to a database? Write down advantage is there in storing metadata in tables?

  What are the data entities of this enterprise

Consider a student club or organization in which you are a member. What are the data entities of this enterprise? List and define each entity

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