Find certain governors general of australia

Assignment Help PL-SQL Programming
Reference no: EM131230843

You are required to submit:

1. The appropriate SQL statements for each query, which should be copied from your SQL code in MySQL and pasted into your submission file, and

2. Screenshots of the resultant tables which are to be pasted into your submission file immediately after the SQL code for that query.

3. Typing or manually drawing the results is NOT acceptable.

Tasks

Part 1

Open the database prime_minister database (prime_minister.sql ) from the ITC556 Interact Resources Databases folder. Answer the following queries using this database.

1. Find certain Governors General of Australia.
a. Find all Governors General of Australia who were Barons at the time of their appointment. List them by Title and name and date that they were appointed to the position. Order the list by ascending date of appointment. (5 marks)
b. Now, format the date of appointment as day of the week, day of the month, month and year; eg. Monday, 01 January, 1901. Order the list by ascending date of appointment.

2. Find certain Leaders of the Opposition.

a. Find all Leaders of the Opposition and their date of appointment, who assumed their position after 01/01/1980.

b. For each Leader of the Opposition listed, add their wife's name and their date of marriage.

3. Find certain Governors General of Australia.

a. List the title, name, date of appointment for Governors General of Australia who were appointed between 01 January 1930 and 01 January 1960. Order by ascending date of appointment. (5 marks)

b. Now add to the results of q3a, the list of Prime Ministers who appointed them and all Leaders of the Opposition who served during their appointment as Governor General of Australia. Order by ascending date of appointment. (5 marks)

4. Who are the Opposition Leaders who subsequently became Prime Minister after 1930?

a. List their name, the date they were elected Opposition Leader and the date they were elected Prime Minister. The dates must be formatted as day of the week, day of the month, month in digits and year in four digits; eg. Monday, 01/01/1901. Order the list in ascending date of appointment as Prime Minister. (15 marks)

b. Now add their Deputy Prime Minister's name and the party that they led. Order the list by ascending date of appointment as Opposition Leader.

Part 2

The design of the Prime_Ministers database is now very old. You have been asked to review this design, as shown in the ERD below and advise how it could be updated. You are to complete the following tasks:

5. Advise how you would improve the ability to query information in this database. For simplicity, use only the tables prime_minister, govemor_general, ministry and opposition in your answer.

a. What new integrity constraints would you use in each of these tables? (5 marks)

b. Why would you use these integrity constraints? Explain how your constraints would improve queries on the tables. (10 marks)

c. Write the DDL code that would implement your new integrity constraints for the following tables:
i. Prime_minister
ii. Governor General
iii. Ministry
iv. Opposition

(Note: You must keep all of the data attributes currently in these tables. Your implementation should include all existing data attributes and any new integrity constraints)

Presentation

You are required to submit:

1. The appropriate SQL statements for each query, which should be copied from your SQL code in MySQL and pasted into a single submission file, and

2. Screenshots of the resultant tables which are to be pasted into your submission file immediately after the SQL code for that query.

3. Typing or manually drawing the results is NOT acceptable

2138_Figure3.jpg

Attachment:- prime_minister_2013.rar

Verified Expert

In this assignment, a database is created in oracle and queries are done in PL/SQL.The assignment is initially provided with the Data definition queries to create database in the oracle. The database is created using those queries. Totally 8 select queries are executed on the database and the information is fetched successfully. Proper database maintenance suggestion are provided and some foreign keys are created on the tables in the database and then the corresponding create table queries are written for the modified table.

Reference no: EM131230843

Questions Cloud

What factors in the workplace are likely to cause : What factors in the workplace are likely to cause the kind of dissatisfaction that would lead to unionization? Do you think it is easier or harder to unionize a workplace?
Find the pep of the transmitter output : The output of the transmitter is connected to a 50-? dummy load that has a calibrated average reading wattmeter. The wattmeter reads 6.9 kW. Find the PEP of the transmitter output.
Why your recommendations are feasible and compelling : Why your recommendations are feasible and compelling. What trends/changes at industry and firm level that could threaten their competitive position?
What is the maximum power dissipated in the resistor : The current through a 1 kΩ resistor is given by i(t) - 2e-t sin(10t) mA for t > 0. Find expressions for the oltage across the resistor and the instantaneous power dissipated by the resistor. What is the maximum power dissipated in the resistor?
Find certain governors general of australia : Find all Leaders of the Opposition and their date of appointment, who assumed their position after 01/01/1980 and For each Leader of the Opposition listed, add their wife's name and their date of marriage.
Identify three to five factors that contributed : Identify three to five factors that contributed to the accounting information system failure within the business that you have identified. Indicate the impact to the business. Provide support for your rationale.
What do writers identify as wild and instinctual in nature : How do the writers see themselves and other creatures in their formulation of nature? - What do the writers identify as wild and instinctual in our nature?
What are the values expressed in the body of the speech : What are the values expressed in the body of the speech? In terms of the organizational patterns discussed in Chapter 9, how is the body of the speech arranged?
Find the phasor currents and the source phasors : For the circuits shown in the figures indicated, label the nodes and meshes and write the ac steady-state KCL and KVL equations. Write all equations in terms of the phasor currents and the source phasors.

Reviews

inf1230843

10/6/2016 8:18:07 AM

Hi ExpertsMind, how are you guys getting along? I got a few inputs from my friends and they all had an extraordinary time of working with you all. Last time I had an extraordinary paper from you. I want to ask for this experts service once more. All the queries have been written along with the screen output which helped me a lot to understanding the solution. Thanks guys u r gr8.

len1230843

10/4/2016 8:30:09 AM

Task SQL tasks 1 - 5 The SQL statements accurately retrieve and format all the required information using concise and correct SQL syntax. Define new integrity constraints Accurate and well-defined explanation of all the integrity constraints to be used and reasons for their use. without errors, is provided with evidence of synthesized application of concepts. Explain how integrity constraints improve queries Comprehensive explanation of use of integrity constraints to improve query performance, with evidence of synthesized application of concepts. Write DDL code for 4 new table implementations The SQL DDL statements accurately create new tables, with all correct integrity constraints using concise and correct SQL syntax.

Write a Review

PL-SQL Programming Questions & Answers

  Create a database model

Create a database model and Submit the table creation statements for the Database Model.

  Write pl-sql procedures and functions

Write PL/SQL procedures and functions to populate and query that database

  Sql questions

Write a query to display using the employees table the EMPLOYEE_ID, FIRST_NAME, LAST_NAME and HIRE_DATE of every employee who was hired after to 1 January, 1995.

  Run the lab_03_01.sql script

Run the lab_03_01.sql script in the attached file to create the SAL_HISTORY table. Display the structure of the SAL_HISTORY table.

  Write sql queries

Write a query to display the last name, department number, and salary of any employee whose department number and salary both match the department number and salary of any employee who earns a commission.

  Explaining sql insert statement to insert new row in cds

Write down a SQL insert statement to insert new row in "CDS" table.

  Write down name of actors in ascending order

Write down actors (or actress, your choice, but not both) who have won at least two (2) Academy Awards for best actor/actress. Provide the actor name, movie title & year. Order the result by actor name."

  What is an sql injection attack

What is an SQL injection attack? Explain how it works, and what precautions must be taken to prevent SQL injection attacks.What are two advantages of encrypting data stored in the database?

  Determine resonant frequency in series rlc resonant circuit

Given the series RLC resonant circuit in the figure, operating at variable frequency, determine: The resonant frequency ω o ,  The circuit’s quality factor Q , The cut-off frequencies, f 1  & f 2  and the bandwidth BW

  Query that uses cube operator to return lineitemsum

Write summary query which uses CUBE operator to return LineItemSum (which is the sum of InvoiceLineItemAmount) group by Account(an alias for AccountDesciption).

  Query to show customers were missing for existing orders

As DBA, your manager called a meeting and asked why there are so many orders for customers that don't exist in the customer table. Write query which would shows which customers were missing for existing orders. Use a join or a subquery.

  Sql query into a relational algebra statement

Turn this SQL query into a relational algebra statement? SELECT Request.reqfor, Ordering.invamt, Ordering.invnbr, Ordering.invdat

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