Write oracle dml statements to drop primary key values

Assignment Help Database Management System
Reference no: EM131891075

Question 1. Use any technique to write or generate the Oracle DDL commands necessary to create thetables, primary keys and referential integrity constraintsfor the tables and attributes listed in Table 1 and Figure 1.

It is not required to name non-key attributes the exactly same the name shown on the relational model.

I will execute the SQL commands to verify that they execute correctly.

• Show evidence that you successfully created the tables - show screenshots

• Submit a copy of the Oracle DDL as a separate file with the name DDL_part1.SQL..

Question 2.  Populate the tables you created in question 1 with the data set provided. Query each table to verify that you populated the tables with the data provided - use any combination of techniques using COUNT and other functions. Finally, export the database.

• Describe the process you followed to populate the database.

• Describe the process you used to verify that you populated the tables successfully.

• Show evidence that you successfully populated your database - show screenshots.

• Show evidence that you successfully verify that you populated the tables with the data provided - show screenshots.

• Submit a copy of the Oracle commands that you used to verify that you populated the tables with the data provided as a separate file with the name TEST_Part2.SQL.

• Submit a copy of the exported entire databaseas a separate file with the name EXPORT_Part2.txt.

Place Question 2 answers and documentation here

Question 3.  Test the primary keys and referential integrity constraints. Write the Oracle DML statements to INSERT duplicate primary key values and foreign key values with no matching primary key for each table where primary keys and foreign keys are defined.

Write Oracle DML statements to DROP primary key values when matching foreign key values exist.

A successful test will generate an error message from Oracle informing you of the constraint violation. Capture screenshots or error logs of these messages. I will execute the SQL commands to verify that they reasonably test the constraints of the database. I will execute the SQL commands to verify that they execute correctly.

• For each test, describe the test, the test data and the expected result of the test.

• Show evidence that you successfully tested the constraints of your database - show screenshots.

• Described any changes you would make to your database as result of your testing.

• Submit a copy of the Oracle SQL test commands with INSERT and DROP commands as a separate file with the name Test_Constraints_Part3.SQL.

• Place Question 3 answers and documentation here.

Question 4.

4.a Write the following queries with comments to identify the queries:

• Determine the state that has the most number of occurrences where Compared to National has the value "Number of Cases Too Small".

• For the state with the most number of occurrences where the Compared to National has the value "Number of Cases Too Small", list the Measure ID and Measure Name.

• For the state with the most number of occurrences where the Compared to National has the value "Number of Cases Too Small", obtain the name and type of the hospital sorted by Measure Name. Include the full state name, the hospital type description and the Measure ID Name in the result set.

• Combine one or more of the previous queries to create one or more queries illustrating the construction of a subquery.

• Show evidence that you successfully executed the queries - show screenshots below of the result of the queries.

4.b Add an index to your database that would benefit the query containing the subquery in part 3.a

4.c Evaluate the impact of your index generating and interpreting SQL execution plans on the query without the index as compared to the query with the index.

 Do not create an index on a primary key

• Explain why the index is beneficial.

• Show evidence that you successfully created the index - show screenshots.

• Show evidence that you successfullyevaluated the impact of your index - show screenshots.

• Submit one file that contains the SQL commands for the queries and the index from question 4 a b. Name the file Part4.SQL.

Attachment:- Excel Project .rar

Reference no: EM131891075

Questions Cloud

What factors influenced your choice and the amount : What factors influenced your choice and the amount of money invested in each?
Calculate the total business deduction related to the car : He paid $1,750 in interest and $170 in property taxes on the car. Calculate the total business deduction related to the car
Determining the investment return : The stock price is currently $78.35. If you owned 300 shares of HillCom, what was your percent return?
What is the amount to use as the annual sales : Required: What is the amount to use as the annual sales figure when evaluating this project?
Write oracle dml statements to drop primary key values : Write Oracle DML statements to DROP primary key values when matching foreign key values exist.
Write your own code to perform the k-core : Write your own code to perform the k-core and onion decompositions of the network. Plot the number of nodes of in the layer l on the y-axis vs l on the x-axis.
What is the net sales : Assuming that Sales Discounts are reported as contra-revenue, compute Net Sales for the two months ended August 31. What is the Net Sales
What amount of bond interest expense : The bonds pay interest June 30 and December 31. What amount of bond interest expense should the company report on its current year income statement?
Investment with an online discount broker : You put it in a mutual fund investment with an online discount broker, earning 6% per year.

Reviews

Write a Review

Database Management System Questions & Answers

  Create set of database tables of relational database model

Use MYSQL to create the set of database tables of the relational database model and complete the associated queries given.

  How memcachedb control reliability or data replication

How memcachedb control reliability or data replication? What are the motivations to adopt memcached and memcachedb as DB?

  Data mining using unsupervised and supervised learning

Data Mining using Unsupervised and Supervised Learning Approaches, Use K-means algorithm (unsupervised learning) to cluster the data set and to verify the class field(s).

  Verify your implementation by viewing the data dictionary

Implement the authorization table using any two suitable application models presented - Use the scripts provided to create a schema - Create three different profiles based on the criteria.

  Create an erd that represents the entities and attributes

Create an ERD that represents the entities, attributes, the relationships between entities, and the cardinality and optionality of each relationship that are described by this business rule

  Produce a data model segment that reflects business rules

The FlyRight Aircraft Maintenance (FRAM) division of the FlyRight Company (FRC) performs all maintenance for FRC's aircraft.

  Create a schema that supports the company business

Create a schema that supports the company's business and processes. Explain and support the database schema with relevant arguments that support the rationale for the structure

  Explaining cardinality of a relationship

What is meant by cardinality of a relationship? Your answer requires to be thorough and specific. Be sure to include the two types of cardinality

  Development of an effective entity relationship model

Determine the steps in the development of an effective Entity Relationship Model (ERM) Diagram and determine the possible iterative steps

  Explain the distribution of the readmission rate for ami

Explain the distribution of the readmission rate for AMI. Demonstrate the method that you used to determine the distribution of the data.

  Create and run the following sql queries

Create and run the following  sql  queries and submit the screen shot of your result. Also submit the file lab_06_03. sql

  Find maximum salary of employees from database table

Find the maximum salary of all employees who are not managers. Give all the managers in the database a 10 percent salary raise. Give all the other employees a 5 percent salary raise.

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