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

  Explain relational database design

How would you change the current design and how does your new design address the problems you have identified with the current design.

  Specify your physical design by identifying the attributes

List the names, ages, and salaries of managers of a user-speci?ed sex (male or female) working in a given department. You can assume that, while there are many departments, each department contains very few project managers.

  List the price of the item called back scratcher

List the first and last names of any customers who have bought all of the items. (This does not need to be as part of a single purchase).

  Based on the baxter aviation scenario that you used for the

based on the baxter aviation scenario that you used for the first exam. please read the following narrative carefully

  Questioncandywarehouse is an online candy store the store

questioncandywarehouse is an online candy store. the store purchases candies from various vendors and one of them is

  Designing and documenting your system

Create a document named: surnameStudentIDAssign1.doc .  In your document, you must include the following section headings:  System Overview, Class Diagram, Class Descriptions, Testing.

  Show the view defnition statements for employeenames and

You want to authorize your secretary to ?re people (you will probably tell him whom to ?re, but you want to be able to delegate thistask), to check on who is an employee, and to check on average department salaries. What privileges should you grant?

  A university library database records

A university library database records information about books; for each book, it records the book isbn number (which is unique), and the book name. In addition, it records which books have been checked out

  Implement in access database using check and unique

These comprise NOT NULL, CHECK, UNIQUE, REFERENTIAL INTEGRITY, and PRIMARY KEY constraints. Are these constraints which we are talking about easy to implement in Access Database?

  Prepare a 900 word paper discussing the attached case study

prepare a 900 word paper discussing the attached case study burger king beefs up global operations and incorporating

  Write functional dependencies in table concerns invoicing

Write the functional dependencies in the following table that concerns invoicing (an application Premiere Products in considering adding to its database), subject to the specified conditions.

  Develop an activity diagram for the scenario

In each task, please feel free to make any assumption necessary for the readers. The explanation of your assumptions can help the readers to understand what you have considered differently but as important criteria in producing your model.

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